I had a lot of problems trying to ad a seperate private key(received from the institute I want to communicate with) to the outgoing message.
I stumbled upon a solution where certificate and private key can be merged into one .pfx file via an commandline instruction.
The resulting .pfx file can then be used with the appropriate C# code to send a, in this case, signed message.
However when I use the commandline command:
openssl pkcs12 -in a.crt -inkey a.key -export -out a.pfx
I get the error message:
unable to load private key
6704:error:0906D06C: PEM routines: PEM_read_bio: no start line: .\crypto\pem\pem_lib.c:696:Expecting: ANY PRIVATE KEY
Do you know what the problemcould be?
I would appreciate your help very much