Lines Matching refs:pkey
28 EVP_PKEY *pkey = NULL; in evp_pkcs82pkey_legacy() local
35 if ((pkey = EVP_PKEY_new()) == NULL) { in evp_pkcs82pkey_legacy()
40 if (!EVP_PKEY_set_type(pkey, OBJ_obj2nid(algoid))) { in evp_pkcs82pkey_legacy()
47 if (pkey->ameth->priv_decode_ex != NULL) { in evp_pkcs82pkey_legacy()
48 if (!pkey->ameth->priv_decode_ex(pkey, p8, libctx, propq)) in evp_pkcs82pkey_legacy()
50 } else if (pkey->ameth->priv_decode != NULL) { in evp_pkcs82pkey_legacy()
51 if (!pkey->ameth->priv_decode(pkey, p8)) { in evp_pkcs82pkey_legacy()
60 return pkey; in evp_pkcs82pkey_legacy()
63 EVP_PKEY_free(pkey); in evp_pkcs82pkey_legacy()
70 EVP_PKEY *pkey = NULL; in EVP_PKCS82PKEY_ex() local
92 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "DER", "PrivateKeyInfo", in EVP_PKCS82PKEY_ex()
103 dctx = OSSL_DECODER_CTX_new_for_pkey(&pkey, "DER", "PrivateKeyInfo", in EVP_PKCS82PKEY_ex()
110 pkey = evp_pkcs82pkey_legacy(p8, libctx, propq); in EVP_PKCS82PKEY_ex()
114 return pkey; in EVP_PKCS82PKEY_ex()
124 PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8(const EVP_PKEY *pkey) in EVP_PKEY2PKCS8() argument
134 if (evp_pkey_is_provided(pkey)) { in EVP_PKEY2PKCS8()
140 if ((ctx = OSSL_ENCODER_CTX_new_for_pkey(pkey, selection, in EVP_PKEY2PKCS8()
158 if (pkey->ameth != NULL) { in EVP_PKEY2PKCS8()
159 if (pkey->ameth->priv_encode != NULL) { in EVP_PKEY2PKCS8()
160 if (!pkey->ameth->priv_encode(p8, pkey)) { in EVP_PKEY2PKCS8()