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 defining OPENSSL_API_COMPAT with a suitable version value. See openssl_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 is NULL? 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 by SRP_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() returns 1 on success, and 0 on failure or if id was NULL. No cap.
  • SRP_user_pwd_set0_sv() returns 1 if both s and v are not NULL, and 0 otherwise. 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 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