Lines Matching refs:NULL
30 unsigned char *tmp = NULL; in srp_Calc_xy()
32 BIGNUM *res = NULL; in srp_Calc_xy()
35 if (sha1 == NULL) in srp_Calc_xy()
36 return NULL; in srp_Calc_xy()
42 if ((tmp = OPENSSL_malloc(numN * 2)) == NULL) in srp_Calc_xy()
46 || !EVP_Digest(tmp, numN * 2, digest, NULL, sha1, NULL)) in srp_Calc_xy()
48 res = BN_bin2bn(digest, sizeof(digest), NULL); in srp_Calc_xy()
73 return srp_Calc_xy(A, B, N, NULL, NULL); in SRP_Calc_u()
79 BIGNUM *tmp = NULL, *S = NULL; in SRP_Calc_server_key()
82 if (u == NULL || A == NULL || v == NULL || b == NULL || N == NULL) in SRP_Calc_server_key()
83 return NULL; in SRP_Calc_server_key()
85 if ((bn_ctx = BN_CTX_new()) == NULL || (tmp = BN_new()) == NULL) in SRP_Calc_server_key()
96 if (S != NULL && !BN_mod_exp(S, tmp, b, N, bn_ctx)) { in SRP_Calc_server_key()
98 S = NULL; in SRP_Calc_server_key()
109 BIGNUM *kv = NULL, *gb = NULL; in SRP_Calc_B_ex()
110 BIGNUM *B = NULL, *k = NULL; in SRP_Calc_B_ex()
113 if (b == NULL || N == NULL || g == NULL || v == NULL || in SRP_Calc_B_ex()
114 (bn_ctx = BN_CTX_new_ex(libctx)) == NULL) in SRP_Calc_B_ex()
115 return NULL; in SRP_Calc_B_ex()
117 if ((kv = BN_new()) == NULL || in SRP_Calc_B_ex()
118 (gb = BN_new()) == NULL || (B = BN_new()) == NULL) in SRP_Calc_B_ex()
124 || (k = srp_Calc_k(N, g, libctx, propq)) == NULL in SRP_Calc_B_ex()
128 B = NULL; in SRP_Calc_B_ex()
141 return SRP_Calc_B_ex(b, N, g, v, NULL, NULL); in SRP_Calc_B()
149 unsigned char *cs = NULL; in SRP_Calc_x_ex()
150 BIGNUM *res = NULL; in SRP_Calc_x_ex()
151 EVP_MD *sha1 = NULL; in SRP_Calc_x_ex()
153 if ((s == NULL) || (user == NULL) || (pass == NULL)) in SRP_Calc_x_ex()
154 return NULL; in SRP_Calc_x_ex()
157 if (ctxt == NULL) in SRP_Calc_x_ex()
158 return NULL; in SRP_Calc_x_ex()
159 if ((cs = OPENSSL_malloc(BN_num_bytes(s))) == NULL) in SRP_Calc_x_ex()
163 if (sha1 == NULL) in SRP_Calc_x_ex()
166 if (!EVP_DigestInit_ex(ctxt, sha1, NULL) in SRP_Calc_x_ex()
170 || !EVP_DigestFinal_ex(ctxt, dig, NULL) in SRP_Calc_x_ex()
171 || !EVP_DigestInit_ex(ctxt, sha1, NULL)) in SRP_Calc_x_ex()
179 || !EVP_DigestFinal_ex(ctxt, dig, NULL)) in SRP_Calc_x_ex()
182 res = BN_bin2bn(dig, sizeof(dig), NULL); in SRP_Calc_x_ex()
193 return SRP_Calc_x_ex(s, user, pass, NULL, NULL); in SRP_Calc_x()
199 BIGNUM *A = NULL; in SRP_Calc_A()
201 if (a == NULL || N == NULL || g == NULL || (bn_ctx = BN_CTX_new()) == NULL) in SRP_Calc_A()
202 return NULL; in SRP_Calc_A()
204 if ((A = BN_new()) != NULL && !BN_mod_exp(A, g, a, N, bn_ctx)) { in SRP_Calc_A()
206 A = NULL; in SRP_Calc_A()
216 BIGNUM *tmp = NULL, *tmp2 = NULL, *tmp3 = NULL, *k = NULL, *K = NULL; in SRP_Calc_client_key_ex()
217 BIGNUM *xtmp = NULL; in SRP_Calc_client_key_ex()
220 if (u == NULL || B == NULL || N == NULL || g == NULL || x == NULL in SRP_Calc_client_key_ex()
221 || a == NULL || (bn_ctx = BN_CTX_new_ex(libctx)) == NULL) in SRP_Calc_client_key_ex()
222 return NULL; in SRP_Calc_client_key_ex()
224 if ((tmp = BN_new()) == NULL || in SRP_Calc_client_key_ex()
225 (tmp2 = BN_new()) == NULL || in SRP_Calc_client_key_ex()
226 (tmp3 = BN_new()) == NULL || in SRP_Calc_client_key_ex()
227 (xtmp = BN_new()) == NULL) in SRP_Calc_client_key_ex()
234 if ((k = srp_Calc_k(N, g, libctx, propq)) == NULL) in SRP_Calc_client_key_ex()
245 if (K != NULL && !BN_mod_exp(K, tmp, tmp2, N, bn_ctx)) { in SRP_Calc_client_key_ex()
247 K = NULL; in SRP_Calc_client_key_ex()
263 return SRP_Calc_client_key_ex(N, B, g, x, a, u, NULL, NULL); in SRP_Calc_client_key()
272 if (B == NULL || N == NULL || (bn_ctx = BN_CTX_new()) == NULL) in SRP_Verify_B_mod_N()
275 if ((r = BN_new()) == NULL) in SRP_Verify_B_mod_N()
312 if ((g == NULL) || (N == NULL)) in SRP_check_known_gN_param()
313 return NULL; in SRP_check_known_gN_param()
319 return NULL; in SRP_check_known_gN_param()
326 if (id == NULL) in SRP_get_default_gN()
332 return NULL; in SRP_get_default_gN()