DSA_NEW(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’– 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 calling DSA_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. if dsa is NULL, nothing is done β€” no drama, no crash, we love a chill function πŸŽ€

🌸 RETURN VALUES 🌸

  • DSA_new() β€” if the allocation fails, it returns NULL and sets an error code that you can grab with ERR_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 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 use EVP_PKEY_new(3) and EVP_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