DSA_NEW(3)
π DSA_NEW(3) π
okay so this one is from the Library Functions Manual, and it's all about the DSA object allocation/freeing girlies. The DSA functions implement the Digital Signature Algorithm β yes, that DSA, bestie.
πΈ NAME πΈ
DSA_new, DSA_up_ref, DSA_free β allocate and free DSA objects, periodt.
β¨ SYNOPSIS β¨
okay so first up, the exact synopsis, no cap:
library βlibcryptoβ #include <openssl/dsa.h>
DSA*
DSA_new(void);
int
DSA_up_ref(DSA *dsa);
void
DSA_free(DSA *dsa);
π¦ DESCRIPTION π¦
The DSA functions implement the Digital Signature Algorithm. iconic crypto behavior, honestly.
DSA_new()β allocates and initializes a DSA structure, and sets the reference count to1. It is equivalent to callingDSA_new_method(3)with aNULLargument. cute, efficient, to the point.DSA_up_ref()β increments the reference count by1. just a lil +1, slay.DSA_free()β decrements the reference count by1. If it reaches0, it frees the DSA structure and its components. The values are erased before the memory is returned to the system. Ifdsais aNULLpointer, no action occurs. very demure, very mindful about cleanup.
bestie listen:DSA_free()only actually frees stuff when the reference count hits0. and ifdsaisNULL, it literally does nothing. no drama.
π RETURN VALUES π
- If the allocation fails,
DSA_new()returnsNULLand sets an error code that can be obtained byERR_get_error(3). Otherwise it returns a pointer to the newly allocated structure. DSA_up_ref()returns1for success or0for failure.
π SEE ALSO π
go read these next, bestie:
BN_new(3)crypto(3)d2i_DSAPublicKey(3)DH_new(3)DSA_do_sign(3)DSA_dup_DH(3)DSA_generate_key(3)DSA_generate_parameters_ex(3)DSA_get0_pqg(3)DSA_get_ex_new_index(3)DSA_meth_new(3)DSA_print(3)DSA_security_bits(3)DSA_set_method(3)DSA_SIG_new(3)DSA_sign(3)DSA_size(3)EVP_PKEY_set1_DSA(3)RSA_new(3)
π STANDARDS π
US Federal Information Processing Standard FIPS 186 (Digital Signature Standard, DSS), ANSI X9.30 β standards receipts, fr fr.
π§ HISTORY π§
DSA_new()andDSA_free()first appeared in SSLeay0.6.0and have been available since OpenBSD2.4. vintage.DSA_up_ref()first appeared in OpenSSL0.9.7and has been available since OpenBSD3.2. also vintage, just a different era.
xoxo, Debian π June 8, 2025 π DSA_NEW(3) π
π¦ 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, 2002 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