File: //usr/local/openssl/man/man3/OpenSSL_add_all_algorithms.3
.\" -*- mode: troff; coding: utf-8 -*-
.\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
.ie n \{\
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds C`
. ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
. if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. if !\nF==2 \{\
. nr % 0
. nr F 2
. \}
. \}
.\}
.rr rF
.\" ========================================================================
.\"
.IX Title "OpenSSL_add_all_algorithms 3"
.TH OpenSSL_add_all_algorithms 3 2019-12-20 1.0.2u OpenSSL
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH NAME
OpenSSL_add_all_algorithms, OpenSSL_add_all_ciphers, OpenSSL_add_all_digests, EVP_cleanup \-
add algorithms to internal table
.SH SYNOPSIS
.IX Header "SYNOPSIS"
.Vb 1
\& #include <openssl/evp.h>
\&
\& void OpenSSL_add_all_algorithms(void);
\& void OpenSSL_add_all_ciphers(void);
\& void OpenSSL_add_all_digests(void);
\&
\& void EVP_cleanup(void);
.Ve
.SH DESCRIPTION
.IX Header "DESCRIPTION"
OpenSSL keeps an internal table of digest algorithms and ciphers. It uses
this table to lookup ciphers via functions such as \fBEVP_get_cipher_byname()\fR.
.PP
\&\fBOpenSSL_add_all_digests()\fR adds all digest algorithms to the table.
.PP
\&\fBOpenSSL_add_all_algorithms()\fR adds all algorithms to the table (digests and
ciphers).
.PP
\&\fBOpenSSL_add_all_ciphers()\fR adds all encryption algorithms to the table including
password based encryption algorithms.
.PP
\&\fBEVP_cleanup()\fR removes all ciphers and digests from the table.
.SH "RETURN VALUES"
.IX Header "RETURN VALUES"
None of the functions return a value.
.SH NOTES
.IX Header "NOTES"
A typical application will call \fBOpenSSL_add_all_algorithms()\fR initially and
\&\fBEVP_cleanup()\fR before exiting.
.PP
An application does not need to add algorithms to use them explicitly, for example
by \fBEVP_sha1()\fR. It just needs to add them if it (or any of the functions it calls)
needs to lookup algorithms.
.PP
The cipher and digest lookup functions are used in many parts of the library. If
the table is not initialized several functions will misbehave and complain they
cannot find algorithms. This includes the PEM, PKCS#12, SSL and S/MIME libraries.
This is a common query in the OpenSSL mailing lists.
.PP
Calling \fBOpenSSL_add_all_algorithms()\fR links in all algorithms: as a result a
statically linked executable can be quite large. If this is important it is possible
to just add the required ciphers and digests.
.SH BUGS
.IX Header "BUGS"
Although the functions do not return error codes it is possible for them to fail.
This will only happen as a result of a memory allocation failure so this is not
too much of a problem in practice.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
\&\fBevp\fR\|(3), \fBEVP_DigestInit\fR\|(3),
\&\fBEVP_EncryptInit\fR\|(3)