| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "DSA_SET_METHOD 3SSL" |
| 58 |
.TH DSA_SET_METHOD 3SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
DSA_set_default_method, DSA_get_default_method, |
| 65 |
DSA_set_method, DSA_new_method, DSA_OpenSSL \- select DSA method |
| 66 |
.SH SYNOPSIS |
| 67 |
.IX Header "SYNOPSIS" |
| 68 |
.Vb 1 |
| 69 |
\& #include <openssl/dsa.h> |
| 70 |
.Ve |
| 71 |
.PP |
| 72 |
The following functions have been deprecated since OpenSSL 3.0, and can be |
| 73 |
hidden entirely by defining \fBOPENSSL_API_COMPAT\fR with a suitable version value, |
| 74 |
see \fBopenssl_user_macros\fR\|(7): |
| 75 |
.PP |
| 76 |
.Vb 1 |
| 77 |
\& void DSA_set_default_method(const DSA_METHOD *meth); |
| 78 |
\& |
| 79 |
\& const DSA_METHOD *DSA_get_default_method(void); |
| 80 |
\& |
| 81 |
\& int DSA_set_method(DSA *dsa, const DSA_METHOD *meth); |
| 82 |
\& |
| 83 |
\& DSA *DSA_new_method(ENGINE *engine); |
| 84 |
\& |
| 85 |
\& const DSA_METHOD *DSA_OpenSSL(void); |
| 86 |
.Ve |
| 87 |
.SH DESCRIPTION |
| 88 |
.IX Header "DESCRIPTION" |
| 89 |
All of the functions described on this page are deprecated. |
| 90 |
Applications should providers instead of method overrides. |
| 91 |
.PP |
| 92 |
A \fBDSA_METHOD\fR specifies the functions that OpenSSL uses for DSA |
| 93 |
operations. By modifying the method, alternative implementations |
| 94 |
such as hardware accelerators may be used. IMPORTANT: See the NOTES section for |
| 95 |
important information about how these DSA API functions are affected by the use |
| 96 |
of \fBENGINE\fR API calls. |
| 97 |
.PP |
| 98 |
Initially, the default DSA_METHOD is the OpenSSL internal implementation, |
| 99 |
as returned by \fBDSA_OpenSSL()\fR. |
| 100 |
.PP |
| 101 |
\&\fBDSA_set_default_method()\fR makes \fBmeth\fR the default method for all DSA |
| 102 |
structures created later. |
| 103 |
\&\fBNB\fR: This is true only whilst no ENGINE has |
| 104 |
been set as a default for DSA, so this function is no longer recommended. |
| 105 |
This function is not thread-safe and should not be called at the same time |
| 106 |
as other OpenSSL functions. |
| 107 |
.PP |
| 108 |
\&\fBDSA_get_default_method()\fR returns a pointer to the current default |
| 109 |
DSA_METHOD. However, the meaningfulness of this result is dependent on |
| 110 |
whether the ENGINE API is being used, so this function is no longer |
| 111 |
recommended. |
| 112 |
.PP |
| 113 |
\&\fBDSA_set_method()\fR selects \fBmeth\fR to perform all operations using the key |
| 114 |
\&\fBrsa\fR. This will replace the DSA_METHOD used by the DSA key and if the |
| 115 |
previous method was supplied by an ENGINE, the handle to that ENGINE will |
| 116 |
be released during the change. It is possible to have DSA keys that only |
| 117 |
work with certain DSA_METHOD implementations (e.g. from an ENGINE module |
| 118 |
that supports embedded hardware-protected keys), and in such cases |
| 119 |
attempting to change the DSA_METHOD for the key can have unexpected |
| 120 |
results. See \fBDSA_meth_new\fR\|(3) for information on constructing custom DSA_METHOD |
| 121 |
objects; |
| 122 |
.PP |
| 123 |
\&\fBDSA_new_method()\fR allocates and initializes a DSA structure so that \fBengine\fR |
| 124 |
will be used for the DSA operations. If \fBengine\fR is NULL, the default engine |
| 125 |
for DSA operations is used, and if no default ENGINE is set, the DSA_METHOD |
| 126 |
controlled by \fBDSA_set_default_method()\fR is used. |
| 127 |
.SH "RETURN VALUES" |
| 128 |
.IX Header "RETURN VALUES" |
| 129 |
\&\fBDSA_OpenSSL()\fR and \fBDSA_get_default_method()\fR return pointers to the respective |
| 130 |
\&\fBDSA_METHOD\fRs. |
| 131 |
.PP |
| 132 |
\&\fBDSA_set_default_method()\fR returns no value. |
| 133 |
.PP |
| 134 |
\&\fBDSA_set_method()\fR returns nonzero if the provided \fBmeth\fR was successfully set as |
| 135 |
the method for \fBdsa\fR (including unloading the ENGINE handle if the previous |
| 136 |
method was supplied by an ENGINE). |
| 137 |
.PP |
| 138 |
\&\fBDSA_new_method()\fR returns NULL and sets an error code that can be |
| 139 |
obtained by \fBERR_get_error\fR\|(3) if the allocation |
| 140 |
fails. Otherwise it returns a pointer to the newly allocated structure. |
| 141 |
.SH "SEE ALSO" |
| 142 |
.IX Header "SEE ALSO" |
| 143 |
\&\fBDSA_new\fR\|(3), \fBDSA_new\fR\|(3), \fBDSA_meth_new\fR\|(3) |
| 144 |
.SH HISTORY |
| 145 |
.IX Header "HISTORY" |
| 146 |
All of these functions were deprecated in OpenSSL 3.0. |
| 147 |
.SH COPYRIGHT |
| 148 |
.IX Header "COPYRIGHT" |
| 149 |
Copyright 2000\-2021 The OpenSSL Project Authors. All Rights Reserved. |
| 150 |
.PP |
| 151 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 152 |
this file except in compliance with the License. You can obtain a copy |
| 153 |
in the file LICENSE in the source distribution or at |
| 154 |
<https://www.openssl.org/source/license.html>. |