SRP_USER_PWD_NEW(3SSL)
π SRP_USER_PWD_NEW β the 3SSL girlies' guide π
okay so bestie, welcome to SRP_user_pwd_new(3SSL) β¨ β this is the OpenSSL page all about making a lil record to store SRP user verifier info. Say it with me: user verifier record. Iconic. Let's go. π¦
β¨ NAME β¨
SRP_user_pwd_new, SRP_user_pwd_free, SRP_user_pwd_set1_ids, SRP_user_pwd_set_gN, SRP_user_pwd_set0_sv β the functions that create a record of SRP user verifier information. That's the whole vibe. π
πΈ SYNOPSIS πΈ
First things first, you gotta pull in the header:
#include <openssl/srp.h>
β οΈ heads up bestie: the following functions have been deprecated since OpenSSL 3.0, and you can hide them entirely by definingOPENSSL_API_COMPATwith a suitable version value. Seeopenssl_user_macros(7)for the deets. π«Ά
SRP_user_pwd *SRP_user_pwd_new(void);
void SRP_user_pwd_free(SRP_user_pwd *user_pwd);
int SRP_user_pwd_set1_ids(SRP_user_pwd *user_pwd, const char *id, const char *info);
void SRP_user_pwd_set_gN(SRP_user_pwd *user_pwd, const BIGNUM *g, const BIGNUM *N);
int SRP_user_pwd_set0_sv(SRP_user_pwd *user_pwd, BIGNUM *s, BIGNUM *v);
π DESCRIPTION π
Not me having to tell you this first: all of the functions described on this page are deprecated. π And likeβ¦ there are no available replacement functions at this time. So it's giving "old faithful, no glow-up planned". Periodt.
Okay now the actual tea, function by function π:
SRP_user_pwd_new()β allocates a structure to store a user verifier record. It's literally building the lil home for your data. πSRP_user_pwd_free()β frees up the user_pwd structure. And if user_pwd isNULL? Nothing happens. It just shrugs and moves on, no drama. πSRP_user_pwd_set1_ids()β sets the username to id and the optional user info to info for user_pwd. The library allocates new copies of id and info, so lowkey the caller still owns the original memory. You keep yours, she makes her own. πSRP_user_pwd_set0_sv()β sets the user salt to s and the verifier to v for user_pwd. Here's the plot twist: the library takes ownership of the values, so the caller should not free them. Not you, bestie. She's got it. πSRP_user_pwd_set_gN()β sets the SRP group parameters for user_pwd. BUT π¨ the memory is not freed bySRP_user_pwd_free(), so the caller must make sure it gets freed once it is no longer used. That's on you, main character. Don't forget. π
β RETURN VALUES β
SRP_user_pwd_set1_ids()returns1on success, and0on failure or if id wasNULL. No cap.SRP_user_pwd_set0_sv()returns1if both s and v are notNULL, and0otherwise. Both or nothing, she's picky like that. π
π SEE ALSO π
Go read these next, they're the friends of the group chat:
π¦ HISTORY π¦
These functions were made public in OpenSSL 3.0 and are deprecated. Yeah. They arrived and got deprecated, it's giving brief but iconic reign. π
π COPYRIGHT π
Copyright 2018-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
okay that's the whole page bestie, you ate that π
β¨ This was SRP_USER_PWD_NEW(3SSL) from OpenSSL 4.0.3, dated 2026-09-29 β love you, bye, go free your memory π«ΆπΈ
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms