return NULL;
}
+int SRP_VBASE_add0_user(SRP_VBASE *vb, SRP_user_pwd *user_pwd)
+{
+ if (sk_SRP_user_pwd_push(vb->users_pwd, user_pwd) <= 0)
+ return 0;
+ return 1;
+}
+
# if OPENSSL_API_COMPAT < 0x10100000L
/*
* DEPRECATED: use SRP_VBASE_get1_by_user instead.
SRP_VBASE_free,
SRP_user_pwd_free,
SRP_VBASE_init,
+SRP_VBASE_add0_user,
SRP_VBASE_get1_by_user,
SRP_VBASE_get_by_user
- Functions to create and manage a stack of SRP user verifier information
int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file);
+ int SRP_VBASE_add0_user(SRP_VBASE *vb, SRP_user_pwd *user_pwd);
SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username);
SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
Note that the base64 encoding used here is non-standard so it is recommended
to use L<srp(1)> to generate this file.
+The SRP_VBASE_add0_user() function adds the B<user_pwd> verifier information
+to the B<vb> structure.
+The library takes ownership of B<user_pwd>, it should not be freed by the caller.
+
The SRP_VBASE_get1_by_user() function returns the password info for the user
whose username matches B<username>. It replaces the deprecated
SRP_VBASE_get_by_user().
B<SRP_ERR_MEMORY> on memory allocation failure and B<SRP_ERR_VBASE_BN_LIB>
for invalid decoded parameter values.
+SRP_VBASE_add0_user() returns 1 on success and 0 on failure.
+
=head1 SEE ALSO
L<srp(1)>,
=head1 HISTORY
-These functions were first added to OpenSSL 1.0.1.
+SRP_VBASE_add0_user() was first added to OpenSSL 1.2.0.
+
+All other functions were first added to OpenSSL 1.0.1.
=head1 COPYRIGHT
void SRP_VBASE_free(SRP_VBASE *vb);
int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file);
+int SRP_VBASE_add0_user(SRP_VBASE *vb, SRP_user_pwd *user_pwd);
/* This method ignores the configured seed and fails for an unknown user. */
DEPRECATEDIN_1_1_0(SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username))
/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/
EVP_str2ctrl 4552 1_1_2 EXIST::FUNCTION:
EVP_hex2ctrl 4553 1_1_2 EXIST::FUNCTION:
EVP_PKEY_supports_digest_nid 4554 1_1_2 EXIST::FUNCTION:
+SRP_VBASE_add0_user 4555 1_1_2 EXIST::FUNCTION:SRP