OK, Thanks.

On 4/27/2016 11:31 PM, Richard Levitte wrote:
In message <5720fd7d.3050...@gmail.com> on Wed, 27 Apr 2016 12:57:17 -0500, Douglas E 
Engert <deeng...@gmail.com> said:

deengert> You can call it a documentation problem. The problem only showed up
deengert> with trying to update d
deengert> in an existing rsa key. RSA_set0_key requires n, e, and d == NULL OR
deengert> n, e, and d to all be set at the same time.

Not any more, just the first time (and then only n and e, d can be
left NULL).  So that makes this particular sequence perfectly legal:

     RSA_set0_key(rsa, n, e, NULL);
     /* calculate d */
     RSA_set0_key(rsa, NULL, NULL, d);

(sloppy code, btw...  return codes should really be checked)

Cheers,
Richard


--

 Douglas E. Engert  <deeng...@gmail.com>

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev

Reply via email to