Lines Matching refs:pkey
372 EVP_PKEY *pkey = key->keydata.pkey;
395 if (r.length < (unsigned int) EVP_PKEY_size(pkey))
398 if (!EVP_SignFinal(evp_md_ctx, r.base, &siglen, pkey)) {
510 EVP_PKEY *pkey = key->keydata.pkey;
530 status = EVP_VerifyFinal(evp_md_ctx, sig->base, sig->length, pkey);
663 pkey1 = key1->keydata.pkey;
664 pkey2 = key2->keydata.pkey;
666 * The pkey reference will keep these around after
727 EVP_PKEY *pkey = EVP_PKEY_new();
733 if (pkey == NULL)
735 if (!EVP_PKEY_set1_RSA(pkey, rsa))
755 key->keydata.pkey = pkey;
768 if (pkey != NULL)
769 EVP_PKEY_free(pkey);
780 EVP_PKEY *pkey = EVP_PKEY_new();
782 if (pkey == NULL)
793 EVP_PKEY_free(pkey);
800 if (!EVP_PKEY_set1_RSA(pkey, rsa)) {
801 EVP_PKEY_free(pkey);
805 key->keydata.pkey = pkey;
818 RSA *rsa = EVP_PKEY_get1_RSA(key->keydata.pkey);
821 /* key->keydata.pkey still has a reference so rsa is still valid. */
833 EVP_PKEY *pkey = key->keydata.pkey;
834 EVP_PKEY_free(pkey);
835 key->keydata.pkey = NULL;
852 EVP_PKEY *pkey;
856 REQUIRE(key->keydata.pkey != NULL);
862 pkey = key->keydata.pkey;
863 rsa = EVP_PKEY_get1_RSA(pkey);
912 EVP_PKEY *pkey;
956 pkey = EVP_PKEY_new();
957 if (pkey == NULL) {
961 if (!EVP_PKEY_set1_RSA(pkey, rsa)) {
962 EVP_PKEY_free(pkey);
966 key->keydata.pkey = pkey;
984 if (key->keydata.pkey == NULL)
986 rsa = EVP_PKEY_get1_RSA(key->keydata.pkey);
1106 EVP_PKEY *pkey = NULL;
1137 pkey = ENGINE_load_private_key(e, label, NULL, NULL);
1138 if (pkey == NULL)
1148 key->key_size = EVP_PKEY_bits(pkey);
1150 key->keydata.pkey = pkey;
1152 key->keydata.rsa = EVP_PKEY_get1_RSA(pkey);
1155 EVP_PKEY_free(pkey);
1170 pkey = EVP_PKEY_new();
1171 if (pkey == NULL)
1173 if (!EVP_PKEY_set1_RSA(pkey, rsa)) {
1176 key->keydata.pkey = pkey;
1235 if (pkey != NULL)
1236 EVP_PKEY_free(pkey);
1253 EVP_PKEY *pkey = NULL;
1260 pkey = ENGINE_load_private_key(e, label, NULL, NULL);
1261 if (pkey == NULL)
1270 key->key_size = EVP_PKEY_bits(pkey);
1272 key->keydata.pkey = pkey;
1274 key->keydata.rsa = EVP_PKEY_get1_RSA(pkey);
1275 EVP_PKEY_free(pkey);
1282 if (pkey != NULL)
1283 EVP_PKEY_free(pkey);