DSA_NEW(3ossl)
π NAME π
ok so like, <pink>DSA_new</pink> and <pink>DSA_free</pink> β the lil duo that allocates and frees DSA objects β¨ this page is literally the OpenSSL manual for them, bestie, welcome π«Ά
β¨ SYNOPSIS β¨
First things first, you gotta pull in the header:
#include <openssl/dsa.h>
okay and now the important vibe check π¨ β 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) if you wanna know the tea β
DSA* DSA_new(void);
void DSA_free(DSA *dsa);
π¦ DESCRIPTION π¦
literally all of the functions described on this page are deprecated. no cap. Applications should instead use EVP_PKEY_new(3) and EVP_PKEY_free(3) β that's the glow-up, that's the main character move π
DSA_new()β allocates and initializes a DSA structure β¨ it's equivalent to callingDSA_new_method(NULL). same energy, different font πDSA_free()β frees the DSA structure and its components. and the way that it's secure π the values are erased before the memory is returned to the system. ifdsaisNULL, nothing is done β no drama, no crash, we love a chill function π
πΈ 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. slay πDSA_free()β returns no value. that's it. that's the whole return. iconic honestly.
π SEE ALSO π
go read these next, iykyk π EVP_PKEY_new(3), EVP_PKEY_free(3), DSA_new(3), ERR_get_error(3), DSA_generate_parameters(3), DSA_generate_key(3)
π HISTORY π
so like, all of these functions were deprecated in OpenSSL 3.0 π that's the whole history section, she's short but she's honest.
π 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>.
bestie reminder π«Ά deprecated β deleted, but it does mean useEVP_PKEY_new(3)andEVP_PKEY_free(3)instead, fr fr. don't come for me, come for the deprecation notice π
and that's the page!! this masterpiece is from OpenSSL 3.5.6, dated 2026-04-07, and you can find her filed under DSA_NEW(3ossl) π
β¨ go forth and allocate responsibly π¦π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms