SRP_USER_PWD_NEW(3ossl)

✨ SRP_user_pwd_new β€” the user verifier record glow-up ✨

okay bestie, pull up a chair because we're talking about SRP_user_pwd_new(3ossl) from the OpenSSL manual (that's the third-section-ossl girly, iykyk). This one is about making, filling, and yeeting records of SRP user verifier information. And listen β€” before you get attached: everything on this page is deprecated. Like, the whole vibe. 🫠


🌸 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 job description, she's got one lane and she's serving in it πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

#include <openssl/srp.h>

so real talk: 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 β€” peek 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 πŸ¦‹

⚠️ All of the functions described on this page are deprecated. There are no available replacement functions at this time. no glow-up replacement, no rebrand, nothing. we're just here. 😭

SRP_user_pwd_new() allocates a structure to store a user verifier record. it's giving newborn main character energy β€” fresh struct, zero thoughts.

SRP_user_pwd_free() frees up the user_pwd structure. and if user_pwd is NULL? nothing happens. she simply does not react. iconic, unbothered, moisturized. πŸ’…

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 the caller still owns the original memory. bestie, you keep your keys, she makes her own copies. that's the arrangement. 🫢

SRP_user_pwd_set0_sv() sets the user salt to s and the verifier to v for user_pwd. and here's the plot twist: the library takes ownership of the values. they should not be freed by the caller. once you hand them over, they're hers. no take-backs, no double-free drama. πŸ’€

SRP_user_pwd_set_gN() sets the SRP group parameters for user_pwd. heads up though: this memory is not freed by SRP_user_pwd_free(). the caller must make sure it is freed once it is no longer used. so she'll hold the pointer but she will NOT clean it up for you β€” that's your chore, bestie. 🧹


⭐ RETURN VALUES ⭐

  • SRP_user_pwd_set1_ids() returns 1 on success and 0 on failure or if id was NULL. so if you passed NULL, that's a 0, not a vibe.
  • SRP_user_pwd_set0_sv() returns 1 if both s and v are not NULL, 0 otherwise. both or nothing, she does not do halves. ✨

🌈 SEE ALSO 🌈

go read those too, bestie, they're the extended universe. πŸ‘‘


πŸ’œ HISTORY πŸ’œ

These functions were made public in OpenSSL 3.0 and are deprecated. yeah. debuted and cancelled in the same era. it happens. πŸ’€


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>.


and that's the whole page, babe β€” this was version 3.5.9, dated 2026-09-29, from the SRP_USER_PWD_NEW(3ossl) manual. deprecated but never forgotten. slay, stay safe, and don't forget to free your group params. πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from