I need a solution
Hi,
I need to find the right command string to export a public key along with the x509 certificate. (that will give me a .crt file extension) I actually need it in .CER format but I don't believe pgp commandline can do that (i'll have to convert it using other means)
Looking at the manual the --export command along with --export-format looks like whta I need to do, but doesnt really give me any syntax guidance:
Export Format
PGP Command Line supports multiple export formats:
- Complete (default): Only ASCII-armored files are output; the default file extension is .asc. Use Complete to export keys in a newer format that supports all PGP features.
- Compatible: Only ASCII-armored files are output; the default file extension is .asc. Use Compatible to export keys in a format compatible with older versions of PGP software; that is, PGP software versions 7.0 and prior. Some newer PGP features are not supported when using Compatible.
- X.509-cert: Only ASCII-armored files are output; the default file extension is .crt. The <input> must match exactly one key, and --cert is required.
- PKCS8: This format can produce unencrypted and encrypted PKCS8. Only ASCII armored files are output; the default file extension is .p8. A signed key must be paired. The <input> must match exactly one key.
It doesn't tell me what syntax I need to use to get it out in X.509 format. There is a command example:
Export the private key associated with the top X.509 certificate
pgp --export "Bob Smith" --export-format pkcs12 --passphrase "B0bsm1t4" --cert 0x6245273E
0x6245273E:export key (0:key exported to Bob Smith.p12)
Bob's key pair is exported to a file "Bob Smith.p12".
But this doesn't give me what I want.
Long story short what I am after is:
- Command to export X509 certificate with public key into DER .crt format or PKCS#7 DER .p7c format
Thanks!