DSA_SIG_NEW(3)
β¨ DSA_SIG_NEW(3) β¨
okay so bestie, this is a page from the Library Functions Manual β yes the actual DSA_SIG_NEW(3) one β and it's all about DSA signature objects and how to wrangle them. buckle up, it's giving very much "small API, big feelings" π
πΈ NAME πΈ
DSA_SIG_new, DSA_SIG_free, DSA_SIG_get0, DSA_SIG_set0 β literally the four functions you need to manipulate DSA signature objects β¨
π¦ SYNOPSIS π¦
the library is libcrypto, and you get at it like this:
#include <openssl/dsa.h>
then the functions themselves:
DSA_SIG *
DSA_SIG_new(void);
void
DSA_SIG_free(DSA_SIG *sig);
void
DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **r, const BIGNUM **s);
int
DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
π DESCRIPTION π
DSA_SIG_new()β allocates an emptyDSA_SIGstructure. a fresh lil baby struct, no thoughts, head empty π£DSA_SIG_free()β frees theDSA_SIGstructure and its components. and no cap, the values get erased before the memory goes back to the system, so nothing lingers. ifsigis aNULLpointer, nothing happens at all β no action occurs, we simply do not perceive it πDSA_SIG_get0()β retrieves internal pointers to therandsvalues contained insig. it's giving "peek behind the curtain" πDSA_SIG_set0()β this is how you actually set therandsvalues. but listen, this part matters: calling this function transfers the memory management of the values tosig, so the caller should not free them. not you, bestie, that'ssig's job now π«Ά
π RETURN VALUES π
if the allocation fails, DSA_SIG_new() returns NULL and sets an error code that you can go grab with ERR_get_error(3). otherwise? it returns a pointer to the newly allocated structure. slay β¨
DSA_SIG_set0() returns 1 on success or 0 on failure. simple as that, no notes π
π SEE ALSO π
π HISTORY π
DSA_SIG_new() and DSA_SIG_free() first appeared in OpenSSL 0.9.3 and have been available since OpenBSD 2.6. iconic longevity honestly β
DSA_SIG_get0() and DSA_SIG_set0() first appeared in OpenSSL 1.1.0 and have been available since OpenBSD 6.3. the newer girlies of the group π§
fr fr, that's the whole page β every flag, every pointer, every return value, all of it. nothing skipped, nothing invented. π
and that's a wrap, bestie! this one's from Debian, dated June 8, 2025, and the page itself is DSA_SIG_NEW(3) in the Library Functions Manual β go be a main character with your DSA signatures now π¦π
π
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2000, 2016 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms