• Home
  • Raw
  • Download

Lines Matching refs:vb

246 	SRP_VBASE *vb = (SRP_VBASE *) OPENSSL_malloc(sizeof(SRP_VBASE));  in SRP_VBASE_new()  local
248 if (vb == NULL) in SRP_VBASE_new()
250 if (!(vb->users_pwd = sk_SRP_user_pwd_new_null()) || in SRP_VBASE_new()
251 !(vb->gN_cache = sk_SRP_gN_cache_new_null())) in SRP_VBASE_new()
253 OPENSSL_free(vb); in SRP_VBASE_new()
256 vb->default_g = NULL; in SRP_VBASE_new()
257 vb->default_N = NULL; in SRP_VBASE_new()
258 vb->seed_key = NULL; in SRP_VBASE_new()
260 (vb->seed_key = BUF_strdup(seed_key)) == NULL) in SRP_VBASE_new()
262 sk_SRP_user_pwd_free(vb->users_pwd); in SRP_VBASE_new()
263 sk_SRP_gN_cache_free(vb->gN_cache); in SRP_VBASE_new()
264 OPENSSL_free(vb); in SRP_VBASE_new()
267 return vb; in SRP_VBASE_new()
271 int SRP_VBASE_free(SRP_VBASE *vb) in SRP_VBASE_free() argument
273 sk_SRP_user_pwd_pop_free(vb->users_pwd,SRP_user_pwd_free); in SRP_VBASE_free()
274 sk_SRP_gN_cache_free(vb->gN_cache); in SRP_VBASE_free()
275 OPENSSL_free(vb->seed_key); in SRP_VBASE_free()
276 OPENSSL_free(vb); in SRP_VBASE_free()
360 int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file) in SRP_VBASE_init() argument
387 if (vb->seed_key) in SRP_VBASE_init()
402 || !(gN->N = SRP_gN_place_bn(vb->gN_cache,pp[DB_srpverifier])) in SRP_VBASE_init()
403 || !(gN->g = SRP_gN_place_bn(vb->gN_cache,pp[DB_srpsalt])) in SRP_VBASE_init()
409 if (vb->seed_key != NULL) in SRP_VBASE_init()
432 if (sk_SRP_user_pwd_insert(vb->users_pwd, user_pwd, 0) == 0) in SRP_VBASE_init()
448 vb->default_g = gN->g ; in SRP_VBASE_init()
449 vb->default_N = gN->N ; in SRP_VBASE_init()
475 SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username) in SRP_VBASE_get_by_user() argument
483 if (vb == NULL) in SRP_VBASE_get_by_user()
485 for(i = 0; i < sk_SRP_user_pwd_num(vb->users_pwd); i++) in SRP_VBASE_get_by_user()
487 user = sk_SRP_user_pwd_value(vb->users_pwd, i); in SRP_VBASE_get_by_user()
491 if ((vb->seed_key == NULL) || in SRP_VBASE_get_by_user()
492 (vb->default_g == NULL) || in SRP_VBASE_get_by_user()
493 (vb->default_N == NULL)) in SRP_VBASE_get_by_user()
501 SRP_user_pwd_set_gN(user,vb->default_g,vb->default_N); in SRP_VBASE_get_by_user()
509 EVP_DigestUpdate(&ctxt, vb->seed_key, strlen(vb->seed_key)); in SRP_VBASE_get_by_user()