Reputation: 1016
i need to sign an xml with a public key, I received some certificates but I do not know which one to use to make the signature. I have received the following file formats: .cer .crt .p7b .p7c I found on the web some tutorials on how to make the signature using pfx format. Do I need to convert them to a .pfx (pkcs12) to sign?
Upvotes: 0
Views: 938
Reputation: 46040
Signing is usually performed using the private key (we don't discuss border cases now). So, if you have been given only the certificates without private keys, you can't use them. Use notepad to look into .cer and .crt files - there's a small chance, that one of those files contains both the certificate and the private key, encoded in PEM format (file extension is not an indicator here). If the file contains the private key, then you can use it.
Upvotes: 1