forked from wolfSSL/wolfssl
i2d_RSAPublicKey(rsa, NULL)
This commit is contained in:
committed by
Go Hosohara
parent
52cee17668
commit
1e87eae3b7
@ -28482,8 +28482,8 @@ int wolfSSL_i2d_RSAPublicKey(WOLFSSL_RSA *rsa, const unsigned char **pp)
|
||||
XFREE(der, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
return ret;
|
||||
}
|
||||
|
||||
*pp = der;
|
||||
if((pp != NULL) && (ret >= 0))
|
||||
*pp = der;
|
||||
return ret;
|
||||
}
|
||||
#endif /* #if !defined(HAVE_FAST_RSA) */
|
||||
|
@ -19180,6 +19180,7 @@ static void test_wolfSSL_RSA_DER(void)
|
||||
{
|
||||
AssertNotNull(d2i_RSAPublicKey(&rsa, &pub[i].der, pub[i].sz));
|
||||
AssertNotNull(rsa);
|
||||
AssertIntEQ(i2d_RSAPublicKey(rsa, NULL), pub[i].sz);
|
||||
buff = NULL;
|
||||
AssertIntEQ(i2d_RSAPublicKey(rsa, &buff), pub[i].sz);
|
||||
AssertNotNull(buff);
|
||||
|
Reference in New Issue
Block a user