Lines Matching defs:key
63 * Create an EVP_PKEY from a type specific key.
64 * This takes ownership of |key|, as long as the |evp_type| is acceptable
70 static EVP_PKEY *evp_pkey_new0_key(void *key, int evp_type)
75 * It's assumed that if |key| is NULL, something went wrong elsewhere
78 if (key == NULL)
89 if (EVP_PKEY_set1_RSA(pkey, key))
96 if (EVP_PKEY_set1_DSA(pkey, key))
107 RSA_free(key);
111 DSA_free(key);
121 /* Convert private key blob to EVP_PKEY: RSA and DSA keys supported */
150 * |*pisdss| is the indicator for whether the key is a DSA key or not.
151 * |*pispub| is the indicator for whether the key is public or not.
287 void *key = NULL;
299 key = ossl_b2i_RSA_after_header(&p, bitlen, *ispub);
302 key = ossl_b2i_DSA_after_header(&p, bitlen, *ispub);
305 if (key == NULL) {
310 return key;
316 void *key = do_b2i_key(in, length, &isdss, ispub);
318 return evp_pkey_new0_key(key, isdss_to_evp_type(isdss));
327 void *key = NULL;
355 key = ossl_b2i_RSA_after_header(&p, bitlen, *ispub);
358 key = ossl_b2i_DSA_after_header(&p, bitlen, *ispub);
361 if (key == NULL) {
366 pkey = evp_pkey_new0_key(key, isdss_to_evp_type(isdss));
402 /* Set constant time flag before public key calculation */
405 /* Calculate public key */
644 * For private key each component must fit within nbyte or hnbyte.
793 static int derive_pvk_key(unsigned char *key,
809 || !EVP_DigestFinal_ex(mctx, key, NULL))
829 void *key = NULL;
904 key = do_b2i_key(&p, keylen, isdss, ispub);
914 return key;
924 void *key = NULL;
946 key = do_PVK_body_key(&p, saltlen, keylen, cb, u, isdss, ispub, libctx, propq);
950 return key;
988 void *key = do_PVK_key_bio(in, cb, u, &isdss, &ispub, NULL, NULL);
990 return evp_pkey_new0_key(key, isdss_to_evp_type(isdss));