DSA_SIG_NEW(3ossl)
π DSA_SIG_NEW π
okay bestie, so this is the OpenSSL manual page for DSA_SIG_NEW(3ossl) and it's literally all about DSA signature objects β how to make them, how to yeet them, how to peek inside, and how to fill them up. it's giving "small API, big feelings." let's get into it π
β¨ NAME β¨
DSA_SIG_get0, DSA_SIG_set0, DSA_SIG_new, DSA_SIG_free β allocate and free DSA signature objects π¦
β¨ SYNOPSIS β¨
#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);
β¨ DESCRIPTION β¨
DSA_SIG_new() allocates an empty DSA_SIG structure. that's it. that's the whole job. an empty lil container, freshly allocated, waiting for its moment π
DSA_SIG_free() frees the DSA_SIG structure and its components. and not in a lazy way either β the values get erased before the memory is handed back to the system, so nothing secret is left lying around. queen behavior fr fr π₯
and if the argument is NULL? nothing happens. it just politely does nothing. no crash, no drama π«Ά
DSA_SIG_get0() returns internal pointers to the r and s values contained in sig. so you're not getting copies, bestie β you're getting pointers into the actual internals. lowkey important, highkey iconic π
the r and s values can be set by calling DSA_SIG_set0() and passing the new values for r and s as parameters to the function. but listen, this is the part you cannot skip:
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. not "probably shouldn't" β should not. if you free them yourself afterwards you're double-freeing and that's a whole mess you do not want π theDSA_SIGowns them now. periodt.
β¨ RETURN VALUES β¨
DSA_SIG_new()β if the allocation fails, it returnsNULLand sets an error code that you can grab withERR_get_error(3). otherwise it returns a pointer to the newly allocated structure β¨DSA_SIG_free()β returns no value. it's a void girlie, she just does her thing and leaves πΈDSA_SIG_set0()β returns1on success or0on failure. classic binary outcome, no in-between, very much giving vibe check π
β¨ SEE ALSO β¨
β¨ 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>.
okay that's the whole page bestie, you ate it, you understood it, you're basically a DSA signature object whisperer now πβ and for the cute sign-off: this was OpenSSL 3.5.9, dated 2026-09-29, DSA_SIG_NEW(3ossl). mwah π go manage your memory responsibly π§π
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms