DSA_NEW(3ossl)
π DSA_NEW π
okay bestie, welcome to DSA_NEW(3ossl) β yes that's the manual name, yes it's giving "OpenSSL lore drop", and yes we're gonna get through this together. This page is about DSA_new and DSA_free, the allocate-and-free duo for DSA objects. Sit down, hydrate, let's go β¨
πΈ NAME πΈ
DSA_new, DSA_free β allocate and free DSA objects. That's it, that's the whole job description, and honestly? They ate π
π SYNOPSIS π
First things first, you're gonna need the header:
#include <openssl/dsa.h>
now here's the thing bestie, 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 β peek at openssl_user_macros(7) for the deets:
DSA* DSA_new(void);
void DSA_free(DSA *dsa);
β¨ DESCRIPTION β¨
okay so, real talk: all of the functions described on this page are deprecated. Not a vibe, I know, but it's the truth. Applications should instead use EVP_PKEY_new(3) and EVP_PKEY_free(3). That's the glow-up, that's the main character path now π
Now the actual lore:
DSA_new()allocates and initializes a DSA structure. It is equivalent to callingDSA_new_method(NULL). Same energy, fewer arguments π«ΆDSA_free()frees the DSA structure and its components. And here's the part that's lowkey iconic: the values are erased before the memory is returned to the system. Clean exit, no crumbs left behind. Also, ifdsaisNULL, nothing is done. Literally nothing. It just vibes. π
β RETURN VALUES β
- If the allocation fails,
DSA_new()returnsNULLand sets an error code that you can grab withERR_get_error(3). Sad girl hours π Otherwise it returns a pointer to the newly allocated structure. Slay. DSA_free()returns no value. It's a void queen. It simply does not participate in the return-value economy π
π SEE ALSO π
the reading list, bestie, go forth and click:
EVP_PKEY_new(3)EVP_PKEY_free(3)DSA_new(3)ERR_get_error(3)DSA_generate_parameters(3)DSA_generate_key(3)
π¦ HISTORY π¦
All of these functions were deprecated in OpenSSL 3.0. So yeah, this whole page is a nostalgia trip. Periodt.
π 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>.
no cap, the license is not optional β read it, respect it, love it π
and that's the whole page, bestie!! this was DSA_NEW(3ossl) from OpenSSL 3.5.9, dated 2026-09-29 β thanks for coming to my TED talk, mwah ππβ¨
π¦ 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