Lines Matching refs:newKey
328 RSA *newKey = RSA_new(); in RSAPublicKey2RSA() local
329 if (!newKey) { in RSAPublicKey2RSA()
342 newKey->n = BN_bin2bn(modulusBuffer, sizeof(modulusBuffer), nullptr); in RSAPublicKey2RSA()
343 newKey->e = BN_new(); in RSAPublicKey2RSA()
344 if (!newKey->e || !BN_set_word(newKey->e, keyStruct->exponent) || !newKey->n) { in RSAPublicKey2RSA()
350 …RSA_set0_key(newKey, BN_bin2bn(modulusBuffer, sizeof(modulusBuffer), nullptr), BN_new(), BN_new()); in RSAPublicKey2RSA()
352 newKey->n = BN_bin2bn(modulusBuffer, sizeof(modulusBuffer), nullptr); in RSAPublicKey2RSA()
353 newKey->e = BN_new(); in RSAPublicKey2RSA()
354 if (!newKey->e || !BN_set_word(newKey->e, keyStruct->exponent) || !newKey->n) { in RSAPublicKey2RSA()
360 *key = newKey; in RSAPublicKey2RSA()
364 if (!ret && newKey) { in RSAPublicKey2RSA()
365 RSA_free(newKey); in RSAPublicKey2RSA()