Lines Matching refs:pubkey

88     X509_PUBKEY *pubkey;  in x509_pubkey_ex_free()  local
90 if (pval != NULL && (pubkey = (X509_PUBKEY *)*pval) != NULL) { in x509_pubkey_ex_free()
91 X509_ALGOR_free(pubkey->algor); in x509_pubkey_ex_free()
92 ASN1_BIT_STRING_free(pubkey->public_key); in x509_pubkey_ex_free()
93 EVP_PKEY_free(pubkey->pkey); in x509_pubkey_ex_free()
94 OPENSSL_free(pubkey->propq); in x509_pubkey_ex_free()
95 OPENSSL_free(pubkey); in x509_pubkey_ex_free()
102 X509_PUBKEY *pubkey = (X509_PUBKEY *)*pval; in x509_pubkey_ex_populate() local
104 return (pubkey->algor != NULL in x509_pubkey_ex_populate()
105 || (pubkey->algor = X509_ALGOR_new()) != NULL) in x509_pubkey_ex_populate()
106 && (pubkey->public_key != NULL in x509_pubkey_ex_populate()
107 || (pubkey->public_key = ASN1_BIT_STRING_new()) != NULL); in x509_pubkey_ex_populate()
138 X509_PUBKEY *pubkey; in x509_pubkey_ex_d2i_ex() local
162 pubkey = (X509_PUBKEY *)*pval; in x509_pubkey_ex_d2i_ex()
163 EVP_PKEY_free(pubkey->pkey); in x509_pubkey_ex_d2i_ex()
164 pubkey->pkey = NULL; in x509_pubkey_ex_d2i_ex()
177 if ((ret = x509_pubkey_decode(&pubkey->pkey, pubkey)) == -1) { in x509_pubkey_ex_d2i_ex()
184 if (ret <= 0 && !pubkey->flag_force_legacy) { in x509_pubkey_ex_d2i_ex()
203 pubkey->algor->algorithm, 0) <= 0) { in x509_pubkey_ex_d2i_ex()
208 OSSL_DECODER_CTX_new_for_pkey(&pubkey->pkey, in x509_pubkey_ex_d2i_ex()
211 pubkey->libctx, in x509_pubkey_ex_d2i_ex()
212 pubkey->propq)) != NULL) in x509_pubkey_ex_d2i_ex()
269 X509_PUBKEY *pubkey = NULL; in IMPLEMENT_EXTERN_ASN1() local
271 pubkey = (X509_PUBKEY *)ASN1_item_new_ex(X509_PUBKEY_it(), libctx, propq); in IMPLEMENT_EXTERN_ASN1()
272 if (!x509_pubkey_set0_libctx(pubkey, libctx, propq)) { in IMPLEMENT_EXTERN_ASN1()
273 X509_PUBKEY_free(pubkey); in IMPLEMENT_EXTERN_ASN1()
274 pubkey = NULL; in IMPLEMENT_EXTERN_ASN1()
276 return pubkey; in IMPLEMENT_EXTERN_ASN1()
285 X509_PUBKEY *pubkey = OPENSSL_zalloc(sizeof(*pubkey)); in X509_PUBKEY_dup() local
287 if (pubkey == NULL) in X509_PUBKEY_dup()
289 if (!x509_pubkey_set0_libctx(pubkey, a->libctx, a->propq)) { in X509_PUBKEY_dup()
291 x509_pubkey_ex_free((ASN1_VALUE **)&pubkey, in X509_PUBKEY_dup()
295 if ((pubkey->algor = X509_ALGOR_dup(a->algor)) == NULL in X509_PUBKEY_dup()
296 || (pubkey->public_key = ASN1_BIT_STRING_new()) == NULL in X509_PUBKEY_dup()
297 || !ASN1_BIT_STRING_set(pubkey->public_key, in X509_PUBKEY_dup()
300 x509_pubkey_ex_free((ASN1_VALUE **)&pubkey, in X509_PUBKEY_dup()
308 pubkey->pkey = EVP_PKEY_dup(a->pkey); in X509_PUBKEY_dup()
309 if (pubkey->pkey == NULL) { in X509_PUBKEY_dup()
310 pubkey->flag_force_legacy = 1; in X509_PUBKEY_dup()
311 if (x509_pubkey_decode(&pubkey->pkey, pubkey) <= 0) { in X509_PUBKEY_dup()
312 x509_pubkey_ex_free((ASN1_VALUE **)&pubkey, in X509_PUBKEY_dup()
320 return pubkey; in X509_PUBKEY_dup()