DSA_NEW(3ossl)
π
DSA_NEW β a.k.a. the 3ossl girlies' guide to DSA_new & DSA_free
okay so real talk bestie, this page lives in the 3ossl section and it's about the two little functions that make and break a DSA object. it's giving "vintage", it's giving "my mom's crypto", and yes β it's deprecated. we'll get there. π
β¨ NAME β¨
DSA_new, DSA_free β allocate and free DSA objects. that's the whole job. allocate. free. iconic minimalism. π¦
πΈ SYNOPSIS πΈ
first, you gotta invite the header in:
#include <openssl/dsa.h>
ok so here's the thing β 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. see openssl_user_macros(7) for the deets. π«Ά
DSA* DSA_new(void);
void DSA_free(DSA *dsa);
π DESCRIPTION π
okay so, big announcement: all of the functions described on this page are deprecated. π not me having to tell you this. Applications should instead use EVP_PKEY_new(3) and EVP_PKEY_free(3). that's the vibe check, and the vibe check has been failed by this manpage.
DSA_new()β allocates and initializes aDSAstructure. it's literally equivalent to callingDSA_new_method(NULL). same energy, no cap. β¨DSA_free()β frees theDSAstructure and its components. and the glow-up? the values are erased before the memory is returned to the system π§Ήπ β she does not leave receipts. also, if dsa isNULL, nothing is done. no crash, no drama, just vibes. π
π RETURN VALUES π
DSA_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. main character returns a pointer, periodt. π₯DSA_free()β returns no value. she gives nothing and she takes nothing (except the memory, which she erases). π
π SEE ALSO π
go read these, bestie, i'm serious:
EVP_PKEY_new(3)EVP_PKEY_free(3)DSA_new(3)ERR_get_error(3)DSA_generate_parameters(3)DSA_generate_key(3)
iykyk π¦
π HISTORY π
all of these functions were deprecated in OpenSSL 3.0. that's it, that's the lore. β
π COPYRIGHT π
Copyright 2000-2016 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>.
fr fr, don't use these in new code βEVP_PKEY_new(3)andEVP_PKEY_free(3)are right there and they ate. π
and that's the page!! this diva is from 3.5.0, dated 2026-09-25 β DSA_NEW(3ossl), slay, bye πβ¨
π¦ 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