Lines Matching refs:NULL
50 if (x != NULL) { in x509_pubkey_set0_libctx()
53 x->propq = NULL; in x509_pubkey_set0_libctx()
54 if (propq != NULL) { in x509_pubkey_set0_libctx()
56 if (x->propq == NULL) in x509_pubkey_set0_libctx()
74 if (xpub == NULL)
75 return NULL;
90 if (pval != NULL && (pubkey = (X509_PUBKEY *)*pval) != NULL) { in x509_pubkey_ex_free()
96 *pval = NULL; in x509_pubkey_ex_free()
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()
116 if ((ret = OPENSSL_zalloc(sizeof(*ret))) == NULL) in x509_pubkey_ex_new_ex()
118 if (!x509_pubkey_ex_populate((ASN1_VALUE **)&ret, NULL) in x509_pubkey_ex_new_ex()
120 x509_pubkey_ex_free((ASN1_VALUE **)&ret, NULL); in x509_pubkey_ex_new_ex()
121 ret = NULL; in x509_pubkey_ex_new_ex()
127 return ret != NULL; in x509_pubkey_ex_new_ex()
140 OSSL_DECODER_CTX *dctx = NULL; in x509_pubkey_ex_d2i_ex()
141 unsigned char *tmpbuf = NULL; in x509_pubkey_ex_d2i_ex()
143 if (*pval == NULL && !x509_pubkey_ex_new_ex(pval, it, libctx, propq)) in x509_pubkey_ex_d2i_ex()
145 if (!x509_pubkey_ex_populate(pval, NULL)) { in x509_pubkey_ex_d2i_ex()
164 pubkey->pkey = NULL; in x509_pubkey_ex_d2i_ex()
195 if (tmpbuf == NULL) in x509_pubkey_ex_d2i_ex()
212 pubkey->propq)) != NULL) in x509_pubkey_ex_d2i_ex()
253 NULL,
254 NULL,
257 NULL,
269 X509_PUBKEY *pubkey = NULL; in IMPLEMENT_EXTERN_ASN1()
274 pubkey = NULL; in IMPLEMENT_EXTERN_ASN1()
287 if (pubkey == NULL) in X509_PUBKEY_dup()
288 return NULL; in X509_PUBKEY_dup()
293 return NULL; 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()
303 return NULL; in X509_PUBKEY_dup()
306 if (a->pkey != NULL) { in X509_PUBKEY_dup()
309 if (pubkey->pkey == NULL) { in X509_PUBKEY_dup()
315 return NULL; in X509_PUBKEY_dup()
325 X509_PUBKEY *pk = NULL; in X509_PUBKEY_set()
327 if (x == NULL || pkey == NULL) { in X509_PUBKEY_set()
332 if (pkey->ameth != NULL) { in X509_PUBKEY_set()
333 if ((pk = X509_PUBKEY_new()) == NULL) { in X509_PUBKEY_set()
337 if (pkey->ameth->pub_encode != NULL) { in X509_PUBKEY_set()
347 unsigned char *der = NULL; in X509_PUBKEY_set()
352 NULL); in X509_PUBKEY_set()
357 pk = d2i_X509_PUBKEY(NULL, &pder, (long)derlen); in X509_PUBKEY_set()
364 if (pk == NULL) { in X509_PUBKEY_set()
386 if (pk->pkey != NULL) in X509_PUBKEY_set()
412 ENGINE *e = NULL; in x509_pubkey_decode()
415 if (e == NULL) in x509_pubkey_decode()
424 if (pkey == NULL) { in x509_pubkey_decode()
457 if (key == NULL) { in X509_PUBKEY_get0()
459 return NULL; in X509_PUBKEY_get0()
462 if (key->pkey == NULL) { in X509_PUBKEY_get0()
465 return NULL; in X509_PUBKEY_get0()
475 if (ret != NULL && !EVP_PKEY_up_ref(ret)) { in X509_PUBKEY_get()
477 ret = NULL; in X509_PUBKEY_get()
495 X509_PUBKEY *xpk, *xpk2 = NULL, **pxpk = NULL; in d2i_PUBKEY_int()
496 EVP_PKEY *pktmp = NULL; in d2i_PUBKEY_int()
506 if (libctx != NULL || propq != NULL || force_legacy) { in d2i_PUBKEY_int()
508 if (xpk2 == NULL) in d2i_PUBKEY_int()
509 return NULL; in d2i_PUBKEY_int()
516 if (xpk == NULL) in d2i_PUBKEY_int()
520 xpk2 = NULL; /* We know that xpk == xpk2 */ in d2i_PUBKEY_int()
521 if (pktmp == NULL) in d2i_PUBKEY_int()
524 if (a != NULL) { in d2i_PUBKEY_int()
537 return d2i_PUBKEY_int(a, pp, length, NULL, NULL, 1, d2i_X509_PUBKEY); in ossl_d2i_PUBKEY_legacy()
548 return d2i_PUBKEY_ex(a, pp, length, NULL, NULL); in d2i_PUBKEY()
555 if (a == NULL) in i2d_PUBKEY()
557 if (a->ameth != NULL) { in i2d_PUBKEY()
558 X509_PUBKEY *xpk = NULL; in i2d_PUBKEY()
560 if ((xpk = X509_PUBKEY_new()) == NULL) in i2d_PUBKEY()
564 if (a->ameth->pub_encode != NULL && a->ameth->pub_encode(xpk, a)) { in i2d_PUBKEY()
567 xpk->pkey = NULL; in i2d_PUBKEY()
570 } else if (a->keymgmt != NULL) { in i2d_PUBKEY()
574 NULL); in i2d_PUBKEY()
576 BUF_MEM *buf = NULL; in i2d_PUBKEY()
579 && out != NULL in i2d_PUBKEY()
584 if (pp != NULL) { in i2d_PUBKEY()
585 if (*pp == NULL) { in i2d_PUBKEY()
588 buf->data = NULL; in i2d_PUBKEY()
608 RSA *key = NULL; in d2i_RSA_PUBKEY()
612 pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length); in d2i_RSA_PUBKEY()
613 if (pkey == NULL) in d2i_RSA_PUBKEY()
614 return NULL; in d2i_RSA_PUBKEY()
617 if (key == NULL) in d2i_RSA_PUBKEY()
618 return NULL; in d2i_RSA_PUBKEY()
620 if (a != NULL) { in d2i_RSA_PUBKEY()
634 if (pktmp == NULL) { in i2d_RSA_PUBKEY()
640 pktmp->pkey.ptr = NULL; in i2d_RSA_PUBKEY()
649 DH *key = NULL; in ossl_d2i_DH_PUBKEY()
653 pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length); in ossl_d2i_DH_PUBKEY()
654 if (pkey == NULL) in ossl_d2i_DH_PUBKEY()
655 return NULL; in ossl_d2i_DH_PUBKEY()
659 if (key == NULL) in ossl_d2i_DH_PUBKEY()
660 return NULL; in ossl_d2i_DH_PUBKEY()
662 if (a != NULL) { in ossl_d2i_DH_PUBKEY()
676 if (pktmp == NULL) { in ossl_i2d_DH_PUBKEY()
682 pktmp->pkey.ptr = NULL; in ossl_i2d_DH_PUBKEY()
690 DH *key = NULL; in ossl_d2i_DHx_PUBKEY()
694 pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length); in ossl_d2i_DHx_PUBKEY()
695 if (pkey == NULL) in ossl_d2i_DHx_PUBKEY()
696 return NULL; in ossl_d2i_DHx_PUBKEY()
700 if (key == NULL) in ossl_d2i_DHx_PUBKEY()
701 return NULL; in ossl_d2i_DHx_PUBKEY()
703 if (a != NULL) { in ossl_d2i_DHx_PUBKEY()
717 if (pktmp == NULL) { in ossl_i2d_DHx_PUBKEY()
723 pktmp->pkey.ptr = NULL; in ossl_i2d_DHx_PUBKEY()
733 DSA *key = NULL; in d2i_DSA_PUBKEY()
737 pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length); in d2i_DSA_PUBKEY()
738 if (pkey == NULL) in d2i_DSA_PUBKEY()
739 return NULL; in d2i_DSA_PUBKEY()
742 if (key == NULL) in d2i_DSA_PUBKEY()
743 return NULL; in d2i_DSA_PUBKEY()
745 if (a != NULL) { in d2i_DSA_PUBKEY()
755 DSA *key = NULL; in ossl_d2i_DSA_PUBKEY()
760 key = d2i_DSA_PUBKEY(NULL, &data, length); in ossl_d2i_DSA_PUBKEY()
761 if (key == NULL) in ossl_d2i_DSA_PUBKEY()
762 return NULL; in ossl_d2i_DSA_PUBKEY()
764 if (p == NULL || q == NULL || g == NULL) { in ossl_d2i_DSA_PUBKEY()
766 return NULL; in ossl_d2i_DSA_PUBKEY()
769 if (a != NULL) { in ossl_d2i_DSA_PUBKEY()
783 if (pktmp == NULL) { in i2d_DSA_PUBKEY()
789 pktmp->pkey.ptr = NULL; in i2d_DSA_PUBKEY()
799 EC_KEY *key = NULL; in d2i_EC_PUBKEY()
804 pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length); in d2i_EC_PUBKEY()
805 if (pkey == NULL) in d2i_EC_PUBKEY()
806 return NULL; in d2i_EC_PUBKEY()
811 if (key == NULL) in d2i_EC_PUBKEY()
812 return NULL; in d2i_EC_PUBKEY()
814 if (a != NULL) { in d2i_EC_PUBKEY()
826 if (a == NULL) in i2d_EC_PUBKEY()
828 if ((pktmp = EVP_PKEY_new()) == NULL) { in i2d_EC_PUBKEY()
834 pktmp->pkey.ptr = NULL; in i2d_EC_PUBKEY()
844 ECX_KEY *key = NULL; in ossl_d2i_ED25519_PUBKEY()
848 pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length); in ossl_d2i_ED25519_PUBKEY()
849 if (pkey == NULL) in ossl_d2i_ED25519_PUBKEY()
850 return NULL; in ossl_d2i_ED25519_PUBKEY()
853 if (key == NULL) in ossl_d2i_ED25519_PUBKEY()
854 return NULL; in ossl_d2i_ED25519_PUBKEY()
856 if (a != NULL) { in ossl_d2i_ED25519_PUBKEY()
868 if (a == NULL) in ossl_i2d_ED25519_PUBKEY()
870 if ((pktmp = EVP_PKEY_new()) == NULL) { in ossl_i2d_ED25519_PUBKEY()
876 pktmp->pkey.ptr = NULL; in ossl_i2d_ED25519_PUBKEY()
885 ECX_KEY *key = NULL; in ossl_d2i_ED448_PUBKEY()
889 pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length); in ossl_d2i_ED448_PUBKEY()
890 if (pkey == NULL) in ossl_d2i_ED448_PUBKEY()
891 return NULL; in ossl_d2i_ED448_PUBKEY()
895 if (key == NULL) in ossl_d2i_ED448_PUBKEY()
896 return NULL; in ossl_d2i_ED448_PUBKEY()
898 if (a != NULL) { in ossl_d2i_ED448_PUBKEY()
910 if (a == NULL) in ossl_i2d_ED448_PUBKEY()
912 if ((pktmp = EVP_PKEY_new()) == NULL) { in ossl_i2d_ED448_PUBKEY()
918 pktmp->pkey.ptr = NULL; in ossl_i2d_ED448_PUBKEY()
927 ECX_KEY *key = NULL; in ossl_d2i_X25519_PUBKEY()
931 pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length); in ossl_d2i_X25519_PUBKEY()
932 if (pkey == NULL) in ossl_d2i_X25519_PUBKEY()
933 return NULL; in ossl_d2i_X25519_PUBKEY()
937 if (key == NULL) in ossl_d2i_X25519_PUBKEY()
938 return NULL; in ossl_d2i_X25519_PUBKEY()
940 if (a != NULL) { in ossl_d2i_X25519_PUBKEY()
952 if (a == NULL) in ossl_i2d_X25519_PUBKEY()
954 if ((pktmp = EVP_PKEY_new()) == NULL) { in ossl_i2d_X25519_PUBKEY()
960 pktmp->pkey.ptr = NULL; in ossl_i2d_X25519_PUBKEY()
969 ECX_KEY *key = NULL; in ossl_d2i_X448_PUBKEY()
973 pkey = ossl_d2i_PUBKEY_legacy(NULL, &q, length); in ossl_d2i_X448_PUBKEY()
974 if (pkey == NULL) in ossl_d2i_X448_PUBKEY()
975 return NULL; in ossl_d2i_X448_PUBKEY()
979 if (key == NULL) in ossl_d2i_X448_PUBKEY()
980 return NULL; in ossl_d2i_X448_PUBKEY()
982 if (a != NULL) { in ossl_d2i_X448_PUBKEY()
994 if (a == NULL) in ossl_i2d_X448_PUBKEY()
996 if ((pktmp = EVP_PKEY_new()) == NULL) { in ossl_i2d_X448_PUBKEY()
1002 pktmp->pkey.ptr = NULL; in ossl_i2d_X448_PUBKEY()
1023 if (penc != NULL) in X509_PUBKEY_set0_param()
1045 if (x == NULL) in X509_get0_pubkey_bitstr()
1046 return NULL; in X509_get0_pubkey_bitstr()
1058 if (a == NULL || b == NULL) in X509_PUBKEY_eq()
1060 if (!X509_PUBKEY_get0_param(NULL, NULL, NULL, &algA, a) || algA == NULL in X509_PUBKEY_eq()
1061 || !X509_PUBKEY_get0_param(NULL, NULL, NULL, &algB, b) || algB == NULL) in X509_PUBKEY_eq()
1065 if ((pA = X509_PUBKEY_get0(a)) == NULL in X509_PUBKEY_eq()
1066 || (pB = X509_PUBKEY_get0(b)) == NULL) in X509_PUBKEY_eq()