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 calling DSA_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, if dsa is NULL, nothing is done. Literally nothing. It just vibes. πŸ™ˆ

⭐ RETURN VALUES ⭐

  • If the allocation fails, DSA_new() returns NULL and sets an error code that you can grab with ERR_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:


πŸ¦‹ HISTORY πŸ¦‹

All of these functions were deprecated in OpenSSL 3.0. So yeah, this whole page is a nostalgia trip. Periodt.


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