DSA_NEW(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… 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 a DSA structure. it's literally equivalent to calling DSA_new_method(NULL). same energy, no cap. ✨
  • DSA_free() β€” frees the DSA structure 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 is NULL, nothing is done. no crash, no drama, just vibes. πŸ™ˆ

πŸ‘‘ 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. 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:

iykyk πŸ¦‹


πŸ“œ HISTORY πŸ“œ

all of these functions were deprecated in OpenSSL 3.0. that's it, that's the lore. ⭐


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) and EVP_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