DSA_SIG_NEW(3ossl)
π DSA_SIG_NEW(3ossl) β aka the DSA_SIG glow-up guide
okay bestie, so this is the OpenSSL manual page for DSA_SIG_get0, DSA_SIG_set0, DSA_SIG_new, and DSA_SIG_free β the whole little friend group that allocates and frees DSA signature objects. yes it's crypto, no you can't skip it, and yes it's lowkey iconic once you get it π
β¨ SYNOPSIS β¨
like, literally just include this and you're in:
#include <openssl/dsa.h>
DSA_SIG *DSA_SIG_new(void);
void DSA_SIG_free(DSA_SIG *a);
void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
no cap, that's the whole vibe right there π
πΈ DESCRIPTION πΈ
DSA_SIG_new()β this one's the birther fr fr. it allocates an emptyDSA_SIGstructure. that's it, that's the whole job. fresh out the box, no values, main character energy πDSA_SIG_free()β the responsible friend who cleans up. it frees theDSA_SIGstructure and its components. and here's the slay detail: the values get erased before the memory goes back to the system π§Ήβ¨ like, security-conscious queen behavior. also! if the argument isNULL, nothing is done. it just shrugs and moves on, we love a graceful no-op π«ΆDSA_SIG_get0()β this one hands you the receipts, but not the real ones β it returns internal pointers to therandsvalues contained insig. so like, peek but don't touch kinda sitch πDSA_SIG_set0()β the setter. you pass in new values forrandsas parameters to the function and boom, they're set. BUT bestie, read this part twice: calling this function transfers the memory management of the values to theDSA_SIGobject. so the values you passed in should not be freed directly after this function has been called β οΈ like, hand over the keys and walk away, don't come back for them.
π₯ RETURN VALUES π₯
- if the allocation fails,
DSA_SIG_new()returnsNULLand sets an error code that you can get withERR_get_error(3). otherwise it returns a pointer to the newly allocated structure π (cute, functional, does exactly what it says) DSA_SIG_free()returns no value. like, at all. nothing. void. it's giving "my work here is done" πDSA_SIG_set0()returns1on success or0on failure. simple as that, iykyk β
π¦ SEE ALSO π¦
go read these next, bestie, they're all connected:
π COPYRIGHT π
Copyright 2000-2024 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 page!! this whole thing came from OpenSSL 3.5.0, dated 2026-09-25 β so when you cite your sources, cite DSA_SIG_NEW(3ossl) like the academic icon you are πβ¨ periodt.
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms