DSA_METH_NEW(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

okay so bestie, welcome to DSA_METH_NEW(3) β€” a Library Functions Manual moment, and yes the manual name is literally DSA_METH_NEW(3). We’re hanging in libcrypto, building up DSA methods like it’s a custom-implementation craft project. πŸ’…βœ¨

🌸 NAME 🌸

DSA_meth_new, DSA_meth_free, DSA_meth_dup, DSA_meth_get0_name, DSA_meth_set1_name, DSA_meth_set_sign, DSA_meth_set_finish β€” build up DSA methods. periodt. πŸŽ€

✨ SYNOPSIS ✨

library β€œlibcrypto” #include <openssl/dsa.h>

DSA_METHOD *
DSA_meth_new(const char *name, int flags);

void
DSA_meth_free(DSA_METHOD *meth);

DSA_METHOD *
DSA_meth_dup(const DSA_METHOD *meth);

const char *
DSA_meth_get0_name(const DSA_METHOD *meth);

int
DSA_meth_set1_name(DSA_METHOD *meth, const char *name);

int
DSA_meth_set_sign(DSA_METHOD *meth,
    DSA_SIG *(*sign)(const unsigned char *, int, DSA *));

int
DSA_meth_set_finish(DSA_METHOD *meth, int (*finish)(DSA *));

πŸ’– DESCRIPTION πŸ’–

The DSA_METHOD structure holds function pointers for custom DSA implementations. It’s the vibe-check blueprint for making DSA do your own thing.

  • DSA_meth_new() β€” creates a new DSA_METHOD structure. A copy of the NUL-terminated name is stored in the new DSA_METHOD object. Any new DSA object constructed from this DSA_METHOD will have the given flags set by default. πŸŽ€
  • DSA_meth_dup() β€” makes a deep copy of meth. This might be useful for creating a new DSA_METHOD based on an existing one, but with some differences. Basically remix energy. πŸ¦‹
  • DSA_meth_free() β€” destroys meth and frees any memory associated with it. bye bestie. πŸ’€
  • DSA_meth_get0_name() β€” returns an internal pointer to the name of meth. Important: that pointer must not be freed by the caller. 🫢
  • DSA_meth_set1_name() β€” stores a copy of the NUL-terminated name in meth after freeing the previously stored name. Method names are ignored by the default DSA implementation but can be used by alternative implementations and by the application program. slay for alternative implementations. ✨
  • DSA_meth_set_sign() β€” sets the function used for creating a DSA signature. That function will be called from DSA_do_sign(3) and indirectly from DSA_sign(3). The parameters of sign have the same meaning as for DSA_do_sign(3). πŸ”₯
  • DSA_meth_set_finish() β€” sets an optional function for destroying a DSA object. Unless finish is NULL, it will be called from DSA_free(3). It takes the same argument and is intended to do DSA implementation specific cleanup. Do not free the memory used by the DSA object itself in the finish function β€” that is not its job, bestie. πŸ‘‘

πŸŽ€ RETURN VALUES πŸŽ€

  • DSA_meth_new() and DSA_meth_dup() return the newly allocated DSA_METHOD object or NULL on failure. πŸ’”
  • DSA_meth_get0_name() returns an internal pointer which must not be freed by the caller. 🫢
  • DSA_meth_set1_name() and all DSA_meth_set_*() functions return 1 on success or 0 on failure. In the current implementation, only DSA_meth_set1_name() can actually fail. πŸ’…

πŸ¦‹ SEE ALSO πŸ¦‹

πŸ‘‘ HISTORY πŸ‘‘

These functions first appeared in OpenSSL 1.1.0. ✨

DSA_meth_new(), DSA_meth_free(), DSA_meth_dup(), DSA_meth_set_sign(), and DSA_meth_set_finish() have been available since OpenBSD 6.3. πŸ¦‹

DSA_meth_get0_name() and DSA_meth_set1_name() have been available since OpenBSD 7.2. 🌈


okay that’s the whole page, bestie. footer vibes: source/version says Debian, date June 8, 2025, and the manual tag is DSA_METH_NEW(3). periodt. πŸ’–πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from