DSA_SET_METHOD(3SSL)
π DSA_SET_METHOD π
okay bestie, welcome to a page from the OpenSSL manual, section 3SSL β yes that's the "library functions" section, and yes this whole page is basically a shrine to the DSA method-selection squad π
β¨ NAME β¨
DSA_set_default_method, DSA_get_default_method, DSA_set_method, DSA_new_method, DSA_OpenSSL β select DSA method π¦
πΈ SYNOPSIS πΈ
#include <openssl/dsa.h>
so here's the tea: 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 β check openssl_user_macros(7) for the deets π
void DSA_set_default_method(const DSA_METHOD *meth);
const DSA_METHOD *DSA_get_default_method(void);
int DSA_set_method(DSA *dsa, const DSA_METHOD *meth);
DSA *DSA_new_method(ENGINE *engine);
const DSA_METHOD *DSA_OpenSSL(void);
π DESCRIPTION π
girl. all of the functions described on this page are deprecated. Applications should providers instead of method overrides. i'm so serious π
A DSA_METHOD specifies the functions that OpenSSL uses for DSA operations. By modifying the method, alternative implementations such as hardware accelerators may be used. it's giving plug-and-play, iconic behavior β¨
Initially, the default DSA_METHOD is the OpenSSL internal implementation, as returned by DSA_OpenSSL() β the OG, the main character π
DSA_set_default_method()β makes meth the default method for all DSA structures created later. NB: this function is not thread-safe and should not be called at the same time as other OpenSSL functions. so likeβ¦ don't multitask with it bestie, fr fr πDSA_get_default_method()β returns a pointer to the current defaultDSA_METHOD.DSA_set_method()β selects meth to perform all operations using the key dsa. This will replace theDSA_METHODused by the DSA key. π«Ά
heads up: it's possible to have DSA keys that only work with certainDSA_METHODimplementations, and in such cases attempting to change theDSA_METHODfor the key can have unexpected results. read that again, no cap π
See DSA_meth_new(3) for information on constructing custom DSA_METHOD objects.
DSA_new_method()β allocates and initializes a DSA structure so that theDSA_METHODcontrolled byDSA_set_default_method()is used. engine must beNULL. that's the whole vibe check, don't fight it π
β RETURN VALUES β
DSA_OpenSSL()andDSA_get_default_method()return pointers to the respectiveDSA_METHODs. πDSA_set_default_method()returns no value. (it's mysterious like that)DSA_set_method()returns nonzero if the provided meth was successfully set as the method for dsa.DSA_new_method()returnsNULLand sets an error code that can be obtained byERR_get_error(3)if the allocation fails. Otherwise it returns a pointer to the newly allocated structure. π
π§ SEE ALSO π§
DSA_new(3)DSA_new(3)β yes bestie, it's listed twice, and honestly? double the love πDSA_meth_new(3)
π HISTORY π
All of these functions were deprecated in OpenSSL 3.0. rip to a real one π
π COPYRIGHT π
Copyright 2000-2025 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>.
and that's the whole page, periodt π
this was OpenSSL 4.0.3, dated 2026-09-29, and it lives under DSA_SET_METHOD(3SSL) β go forth and set your methods wisely, bestie π¦ππ
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms