I am trying to find the analogue of the {i2d,d2i}_{DSA,RSA}PublicKey
functions for ECDSA EC_KEY's. As best I can tell,
i2dECPKParameters+ECPublicKey_get_octet_string and
d2iECPKParameters+ECPublicKey_set_octet_string are the way to do the
encoding/decoding of just the public portions of an EC_KEY. However,
unlike all the other encoding routines in OpenSSL,
ECPublicKey_{set,get}_octet_string() does not advance the supplied
buffer after copying the key to it.
Instead, if *in is non-NULL, it remains pointing to the start of the
copied key after the function returns (In every other encoding routine
I've used *in is advanced to point to the byte after the just encoded
data).
Is there a reason these functions deviates from the normal OpenSSL
behavior? It was hard enough to figure out the unwritten rules of when
the input buffer does and does not get advanced to begin with, and now
if some functions adhere to it and some don't...
Thanks,
Eric
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]
- Re: Inconsistent behavior of ECPublicKey_{set,get}_octe... Eric Cronin
- Re: Inconsistent behavior of ECPublicKey_{set,get}... Dr. Stephen Henson
- Re: Inconsistent behavior of ECPublicKey_{set,get}... Nils Larsch
- Re: Inconsistent behavior of ECPublicKey_{set,... Eric Cronin
- Re: Inconsistent behavior of ECPublicKey_{... Nils Larsch
- Re: Inconsistent behavior of ECPublicK... Dr. Stephen Henson