[openssl-dev] Retrieving DSA public key (Y) in ASN.1 format
Dave Thompson
dthompson at prinpay.com
Tue Dec 16 23:14:22 UTC 2014
> [DSAPublicKey] defined where you would expect, in dsa/dsa_asn1.c .
> But it's defined as a "choice" that does either the standard INTEGER
> (from internal BIGNUM) *OR* the above SEQUENCE which is named
> 'dsa_pub_internal' suggesting that it should be internal to OpenSSL
> i.e. not interoperable or standard, but not explained that I can find.
>
> Anyway, to get the standard form apparently you need to set
> dsa->write_params to 0 (false) which is done *for the SPKI form*
> in dsa_ameth.c dsa_pub_encode.
>
Argh! Too obvious! It's in the manpage for i2d_DSAPublicKey
although IMO slightly overstated; the 0 format is standard AFAICT.
More information about the openssl-dev
mailing list