Hello,
> Yes, my public key now is base64 pem format, how do I make it a DER
> format? I believe I removed the headers and replace .pem with .cer,
> and make the public key all in one line?
If you have DSA public key in file dsa-pub-key.pem then
to convert this to DER form use:

$ head -1 dsa-pub-key.pem
-----BEGIN PUBLIC KEY-----

$ openssl dsa -in dsa-pub-key.pem -out dsa-pub-key.der \
        -outform der -pubin
read DSA key
writing DSA key

and to check:

$ openssl dsa -in dsa-pub-key.der -inform der -pubin -text -noout
read DSA key
pub:
    56:59:95:61:9f:6a:bc:1c:21:a3:3e:d5:a0:1e:b9:
    3a:93:9e:f6:4b:12:56:97:04:cd:2c:e7:b7:ac:5a:
....

$ openssl asn1parse -in dsa-pub-key.der -inform der
    0:d=0  hl=4 l= 438 cons: SEQUENCE
    4:d=1  hl=4 l= 299 cons: SEQUENCE
    8:d=2  hl=2 l=   7 prim: OBJECT            :dsaEncryption
   17:d=2  hl=4 l= 286 cons: SEQUENCE
....

Best regards,
-- 
Marek Marcola <[EMAIL PROTECTED]>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to