Blame doc/man3/DSA_set_method.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
DSA_set_default_method, DSA_get_default_method,
Packit c4476c
DSA_set_method, DSA_new_method, DSA_OpenSSL - select DSA method
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/dsa.h>
Packit c4476c
Packit c4476c
 void DSA_set_default_method(const DSA_METHOD *meth);
Packit c4476c
Packit c4476c
 const DSA_METHOD *DSA_get_default_method(void);
Packit c4476c
Packit c4476c
 int DSA_set_method(DSA *dsa, const DSA_METHOD *meth);
Packit c4476c
Packit c4476c
 DSA *DSA_new_method(ENGINE *engine);
Packit c4476c
Packit c4476c
 DSA_METHOD *DSA_OpenSSL(void);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
A B<DSA_METHOD> specifies the functions that OpenSSL uses for DSA
Packit c4476c
operations. By modifying the method, alternative implementations
Packit c4476c
such as hardware accelerators may be used. IMPORTANT: See the NOTES section for
Packit c4476c
important information about how these DSA API functions are affected by the use
Packit c4476c
of B<ENGINE> API calls.
Packit c4476c
Packit c4476c
Initially, the default DSA_METHOD is the OpenSSL internal implementation,
Packit c4476c
as returned by DSA_OpenSSL().
Packit c4476c
Packit c4476c
DSA_set_default_method() makes B<meth> the default method for all DSA
Packit c4476c
structures created later.
Packit c4476c
B<NB>: This is true only whilst no ENGINE has
Packit c4476c
been set as a default for DSA, so this function is no longer recommended.
Packit c4476c
This function is not thread-safe and should not be called at the same time
Packit c4476c
as other OpenSSL functions.
Packit c4476c
Packit c4476c
DSA_get_default_method() returns a pointer to the current default
Packit c4476c
DSA_METHOD. However, the meaningfulness of this result is dependent on
Packit c4476c
whether the ENGINE API is being used, so this function is no longer
Packit c4476c
recommended.
Packit c4476c
Packit c4476c
DSA_set_method() selects B<meth> to perform all operations using the key
Packit c4476c
B<rsa>. This will replace the DSA_METHOD used by the DSA key and if the
Packit c4476c
previous method was supplied by an ENGINE, the handle to that ENGINE will
Packit c4476c
be released during the change. It is possible to have DSA keys that only
Packit c4476c
work with certain DSA_METHOD implementations (eg. from an ENGINE module
Packit c4476c
that supports embedded hardware-protected keys), and in such cases
Packit c4476c
attempting to change the DSA_METHOD for the key can have unexpected
Packit c4476c
results. See L<DSA_meth_new> for information on constructing custom DSA_METHOD
Packit c4476c
objects;
Packit c4476c
Packit c4476c
DSA_new_method() allocates and initializes a DSA structure so that B<engine>
Packit c4476c
will be used for the DSA operations. If B<engine> is NULL, the default engine
Packit c4476c
for DSA operations is used, and if no default ENGINE is set, the DSA_METHOD
Packit c4476c
controlled by DSA_set_default_method() is used.
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
DSA_OpenSSL() and DSA_get_default_method() return pointers to the respective
Packit c4476c
B<DSA_METHOD>s.
Packit c4476c
Packit c4476c
DSA_set_default_method() returns no value.
Packit c4476c
Packit c4476c
DSA_set_method() returns non-zero if the provided B<meth> was successfully set as
Packit c4476c
the method for B<dsa> (including unloading the ENGINE handle if the previous
Packit c4476c
method was supplied by an ENGINE).
Packit c4476c
Packit c4476c
DSA_new_method() returns NULL and sets an error code that can be
Packit c4476c
obtained by L<ERR_get_error(3)> if the allocation
Packit c4476c
fails. Otherwise it returns a pointer to the newly allocated structure.
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<DSA_new(3)>, L<DSA_new(3)>, L<DSA_meth_new(3)>
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut