Lines Matching refs:NULL

62     if (ctx == NULL)  in t_fromb64()
140 if (ctx == NULL) in t_tob64()
181 if (user_pwd == NULL) in SRP_user_pwd_free()
194 if ((ret = OPENSSL_malloc(sizeof(*ret))) == NULL) in SRP_user_pwd_new()
195 return NULL; in SRP_user_pwd_new()
196 ret->N = NULL; in SRP_user_pwd_new()
197 ret->g = NULL; in SRP_user_pwd_new()
198 ret->s = NULL; in SRP_user_pwd_new()
199 ret->v = NULL; in SRP_user_pwd_new()
200 ret->id = NULL; in SRP_user_pwd_new()
201 ret->info = NULL; in SRP_user_pwd_new()
217 vinfo->id = NULL; in SRP_user_pwd_set1_ids()
218 vinfo->info = NULL; in SRP_user_pwd_set1_ids()
219 if (id != NULL && NULL == (vinfo->id = OPENSSL_strdup(id))) in SRP_user_pwd_set1_ids()
221 return (info == NULL || NULL != (vinfo->info = OPENSSL_strdup(info))); in SRP_user_pwd_set1_ids()
230 vinfo->v = NULL; in SRP_user_pwd_set_sv()
231 vinfo->s = NULL; in SRP_user_pwd_set_sv()
236 if (NULL == (vinfo->v = BN_bin2bn(tmp, len, NULL))) in SRP_user_pwd_set_sv()
241 vinfo->s = BN_bin2bn(tmp, len, NULL); in SRP_user_pwd_set_sv()
242 if (vinfo->s == NULL) in SRP_user_pwd_set_sv()
247 vinfo->v = NULL; in SRP_user_pwd_set_sv()
257 return (vinfo->s != NULL && vinfo->v != NULL); in SRP_user_pwd_set0_sv()
264 if (src == NULL) in srp_user_pwd_dup()
265 return NULL; in srp_user_pwd_dup()
266 if ((ret = SRP_user_pwd_new()) == NULL) in srp_user_pwd_dup()
267 return NULL; in srp_user_pwd_dup()
273 return NULL; in srp_user_pwd_dup()
282 if (vb == NULL) in SRP_VBASE_new()
283 return NULL; in SRP_VBASE_new()
284 if ((vb->users_pwd = sk_SRP_user_pwd_new_null()) == NULL in SRP_VBASE_new()
285 || (vb->gN_cache = sk_SRP_gN_cache_new_null()) == NULL) { in SRP_VBASE_new()
288 return NULL; in SRP_VBASE_new()
290 vb->default_g = NULL; in SRP_VBASE_new()
291 vb->default_N = NULL; in SRP_VBASE_new()
292 vb->seed_key = NULL; in SRP_VBASE_new()
293 if ((seed_key != NULL) && (vb->seed_key = OPENSSL_strdup(seed_key)) == NULL) { in SRP_VBASE_new()
297 return NULL; in SRP_VBASE_new()
318 if (newgN == NULL) in SRP_gN_new_init()
319 return NULL; in SRP_gN_new_init()
325 if ((newgN->b64_bn = OPENSSL_strdup(ch)) == NULL) in SRP_gN_new_init()
328 if ((newgN->bn = BN_bin2bn(tmp, len, NULL))) in SRP_gN_new_init()
334 return NULL; in SRP_gN_new_init()
339 if (gN_cache == NULL) in SRP_gN_free()
351 if (gN_tab != NULL) { in SRP_get_gN_by_id()
354 if (gN && (id == NULL || strcmp(gN->id, id) == 0)) in SRP_get_gN_by_id()
365 if (gN_cache == NULL) in SRP_gN_place_bn()
366 return NULL; in SRP_gN_place_bn()
382 return NULL; in SRP_gN_place_bn()
399 char *last_index = NULL; in SRP_VBASE_init()
403 SRP_gN *gN = NULL; in SRP_VBASE_init()
404 SRP_user_pwd *user_pwd = NULL; in SRP_VBASE_init()
406 TXT_DB *tmpdb = NULL; in SRP_VBASE_init()
409 if (SRP_gN_tab == NULL) in SRP_VBASE_init()
414 if (verifier_file == NULL) { in SRP_VBASE_init()
419 if (in == NULL || BIO_read_filename(in, verifier_file) <= 0) in SRP_VBASE_init()
424 if ((tmpdb = TXT_DB_read(in, DB_NUMBER)) == NULL) in SRP_VBASE_init()
430 last_index = SRP_get_default_gN(NULL)->id; in SRP_VBASE_init()
439 if ((gN = OPENSSL_malloc(sizeof(*gN))) == NULL) in SRP_VBASE_init()
442 if ((gN->id = OPENSSL_strdup(pp[DB_srpid])) == NULL in SRP_VBASE_init()
444 == NULL in SRP_VBASE_init()
446 == NULL in SRP_VBASE_init()
450 gN = NULL; in SRP_VBASE_init()
452 if (vb->seed_key != NULL) { in SRP_VBASE_init()
459 if ((lgN = SRP_get_gN_by_id(pp[DB_srpgN], SRP_gN_tab)) != NULL) { in SRP_VBASE_init()
461 if ((user_pwd = SRP_user_pwd_new()) == NULL) in SRP_VBASE_init()
476 user_pwd = NULL; /* abandon responsibility */ in SRP_VBASE_init()
481 if (last_index != NULL) { in SRP_VBASE_init()
484 if (((gN = SRP_get_gN_by_id(last_index, SRP_gN_tab)) == NULL)) { in SRP_VBASE_init()
490 gN = NULL; in SRP_VBASE_init()
500 if (gN != NULL) { in SRP_VBASE_init()
521 if (vb == NULL) in find_user()
522 return NULL; in find_user()
530 return NULL; in find_user()
562 EVP_MD_CTX *ctxt = NULL; in SRP_VBASE_get1_by_user()
563 EVP_MD *md = NULL; in SRP_VBASE_get1_by_user()
565 if (vb == NULL) in SRP_VBASE_get1_by_user()
566 return NULL; in SRP_VBASE_get1_by_user()
568 if ((user = find_user(vb, username)) != NULL) in SRP_VBASE_get1_by_user()
571 if ((vb->seed_key == NULL) || in SRP_VBASE_get1_by_user()
572 (vb->default_g == NULL) || (vb->default_N == NULL)) in SRP_VBASE_get1_by_user()
573 return NULL; in SRP_VBASE_get1_by_user()
577 if ((user = SRP_user_pwd_new()) == NULL) in SRP_VBASE_get1_by_user()
578 return NULL; in SRP_VBASE_get1_by_user()
582 if (!SRP_user_pwd_set1_ids(user, username, NULL)) in SRP_VBASE_get1_by_user()
587 md = EVP_MD_fetch(NULL, SN_sha1, NULL); in SRP_VBASE_get1_by_user()
588 if (md == NULL) in SRP_VBASE_get1_by_user()
591 if (ctxt == NULL in SRP_VBASE_get1_by_user()
592 || !EVP_DigestInit_ex(ctxt, md, NULL) in SRP_VBASE_get1_by_user()
595 || !EVP_DigestFinal_ex(ctxt, digs, NULL)) in SRP_VBASE_get1_by_user()
598 ctxt = NULL; in SRP_VBASE_get1_by_user()
600 md = NULL; in SRP_VBASE_get1_by_user()
602 BN_bin2bn(digs, SHA_DIGEST_LENGTH, NULL), in SRP_VBASE_get1_by_user()
603 BN_bin2bn(digv, SHA_DIGEST_LENGTH, NULL))) in SRP_VBASE_get1_by_user()
610 return NULL; in SRP_VBASE_get1_by_user()
621 char *result = NULL, *vf = NULL; in SRP_create_verifier_ex()
622 const BIGNUM *N_bn = NULL, *g_bn = NULL; in SRP_create_verifier_ex()
623 BIGNUM *N_bn_alloc = NULL, *g_bn_alloc = NULL, *s = NULL, *v = NULL; in SRP_create_verifier_ex()
626 char *defgNid = NULL; in SRP_create_verifier_ex()
629 if ((user == NULL) || in SRP_create_verifier_ex()
630 (pass == NULL) || (salt == NULL) || (verifier == NULL)) in SRP_create_verifier_ex()
636 N_bn_alloc = BN_bin2bn(tmp, len, NULL); in SRP_create_verifier_ex()
637 if (N_bn_alloc == NULL) in SRP_create_verifier_ex()
642 g_bn_alloc = BN_bin2bn(tmp, len, NULL); in SRP_create_verifier_ex()
643 if (g_bn_alloc == NULL) in SRP_create_verifier_ex()
649 if (gN == NULL) in SRP_create_verifier_ex()
656 if (*salt == NULL) { in SRP_create_verifier_ex()
660 s = BN_bin2bn(tmp2, SRP_RANDOM_SALT_LEN, NULL); in SRP_create_verifier_ex()
664 s = BN_bin2bn(tmp2, len, NULL); in SRP_create_verifier_ex()
666 if (s == NULL) in SRP_create_verifier_ex()
676 if (((vf = OPENSSL_malloc(vfsize)) == NULL)) in SRP_create_verifier_ex()
681 if (*salt == NULL) { in SRP_create_verifier_ex()
684 if ((tmp_salt = OPENSSL_malloc(SRP_RANDOM_SALT_LEN * 2)) == NULL) { in SRP_create_verifier_ex()
695 vf = NULL; in SRP_create_verifier_ex()
710 return SRP_create_verifier_ex(user, pass, salt, verifier, N, g, NULL, NULL); in SRP_create_verifier()
728 BIGNUM *x = NULL; in SRP_create_verifier_BN_ex()
731 BIGNUM *salttmp = NULL, *verif; in SRP_create_verifier_BN_ex()
733 if ((user == NULL) || in SRP_create_verifier_BN_ex()
734 (pass == NULL) || in SRP_create_verifier_BN_ex()
735 (salt == NULL) || in SRP_create_verifier_BN_ex()
736 (verifier == NULL) || (N == NULL) || (g == NULL) || (bn_ctx == NULL)) in SRP_create_verifier_BN_ex()
739 if (*salt == NULL) { in SRP_create_verifier_BN_ex()
743 salttmp = BN_bin2bn(tmp2, SRP_RANDOM_SALT_LEN, NULL); in SRP_create_verifier_BN_ex()
744 if (salttmp == NULL) in SRP_create_verifier_BN_ex()
751 if (x == NULL) in SRP_create_verifier_BN_ex()
755 if (verif == NULL) in SRP_create_verifier_BN_ex()
768 if (salt != NULL && *salt != salttmp) in SRP_create_verifier_BN_ex()
779 return SRP_create_verifier_BN_ex(user, pass, salt, verifier, N, g, NULL, in SRP_create_verifier_BN()
780 NULL); in SRP_create_verifier_BN()