i2d_ASN1_INTEGER zero pad

Matt Caswell matt at openssl.org
Wed Aug 7 08:06:09 UTC 2019

On 06/08/2019 17:16, Matt Caswell wrote:
>     sig->r = BN_bin2bn(r, rlen, NULL);
>     sig->s = BN_bin2bn(s, slen, NULL);

As a slight amendment to my earlier answer - a better way to do the above two
lines would be to use the ECDSA_SIG_set0() function to set the r and s
components rather than diving into the internals of the ECDSA_SIG structure.


More information about the openssl-users mailing list