OK there was an error in my example. The get needed 2 "&":
RSA_get0_key(rsa, &my_n, &my_e, NULL); /* note this is a GET0 */
/* my_n now points to the BIGNUM as does rsa->n */
/* my_e now points to the BIGNUM as does rsa->e */
/* other stuff done, such as calculating d */
RSA_set0_key(rsa, my_n, my_e, d);
/* RSA_set0_key does not check if my_n == rsa->n
It frees rsa->n and replaces it with my_n which is is pointing at the freed
location */
>>
On 4/26/2016 10:37 AM, Blumenthal, Uri - 0553 - MITLL wrote:
On 4/26/16, 11:21 , "openssl-dev on behalf of Salz, Rich via RT"
<openssl-dev-boun...@openssl.org on behalf of r...@openssl.org> wrote:
RSA_get0_key(rsa, n, e, NULL); /* note this is a GET0 */
/* other stuff done, such as calculating d */
RSA_set0_key(rsa, n, e, d);
rsa is left with n and e pointing to unallocated storage.
That code is incorrect.
Would you mind giving more explanation please?
--
Douglas E. Engert <deeng...@gmail.com>
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev