summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2016-11-03 12:21:50 +0000
committerschwarze <>2016-11-03 12:21:50 +0000
commit61150c63123fd35d04d23a0f8879a03f82044004 (patch)
tree0a5cc7708ea5734467780929f9b2612a488b25fe /src
parent99421a4d33ceb28652f51f4a28160d96485e712e (diff)
downloadopenbsd-61150c63123fd35d04d23a0f8879a03f82044004.tar.gz
openbsd-61150c63123fd35d04d23a0f8879a03f82044004.tar.bz2
openbsd-61150c63123fd35d04d23a0f8879a03f82044004.zip
convert configuration manuals from pod to mdoc
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/doc/OPENSSL_VERSION_NUMBER.pod101
-rw-r--r--src/lib/libcrypto/doc/OPENSSL_config.pod82
-rw-r--r--src/lib/libcrypto/doc/OPENSSL_load_builtin_modules.pod51
-rw-r--r--src/lib/libcrypto/doc/OpenSSL_add_all_algorithms.pod66
-rw-r--r--src/lib/libcrypto/man/Makefile10
-rw-r--r--src/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.396
-rw-r--r--src/lib/libcrypto/man/OPENSSL_config.3115
-rw-r--r--src/lib/libcrypto/man/OPENSSL_load_builtin_modules.353
-rw-r--r--src/lib/libcrypto/man/OpenSSL_add_all_algorithms.371
9 files changed, 340 insertions, 305 deletions
diff --git a/src/lib/libcrypto/doc/OPENSSL_VERSION_NUMBER.pod b/src/lib/libcrypto/doc/OPENSSL_VERSION_NUMBER.pod
deleted file mode 100644
index 2f63a18a71..0000000000
--- a/src/lib/libcrypto/doc/OPENSSL_VERSION_NUMBER.pod
+++ /dev/null
@@ -1,101 +0,0 @@
1=pod
2
3=head1 NAME
4
5OPENSSL_VERSION_NUMBER, SSLeay, SSLeay_version - get OpenSSL version number
6
7=head1 SYNOPSIS
8
9 #include <openssl/opensslv.h>
10 #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnnL
11
12 #include <openssl/crypto.h>
13 long SSLeay(void);
14 const char *SSLeay_version(int t);
15
16=head1 DESCRIPTION
17
18OPENSSL_VERSION_NUMBER is a numeric release version identifier:
19
20 MMNNFFPPS: major minor fix patch status
21
22The status nibble has one of the values 0 for development, 1 to e for betas
231 to 14, and f for release.
24
25for example
26
27 0x000906000 == 0.9.6 dev
28 0x000906023 == 0.9.6b beta 3
29 0x00090605f == 0.9.6e release
30
31Versions prior to 0.9.3 have identifiers E<lt> 0x0930.
32Versions between 0.9.3 and 0.9.5 had a version identifier with this
33interpretation:
34
35 MMNNFFRBB major minor fix final beta/patch
36
37for example
38
39 0x000904100 == 0.9.4 release
40 0x000905000 == 0.9.5 dev
41
42Version 0.9.5a had an interim interpretation that is like the current one,
43except the patch level got the highest bit set, to keep continuity. The
44number was therefore 0x0090581f.
45
46
47For backward compatibility, SSLEAY_VERSION_NUMBER is also defined.
48
49SSLeay() returns this number. The return value can be compared to the
50macro to make sure that the correct version of the library has been
51loaded, especially when using DLLs on Windows systems.
52
53SSLeay_version() returns different strings depending on B<t>:
54
55=over 4
56
57=item SSLEAY_VERSION
58
59The text variant of the version number and the release date. For example,
60"OpenSSL 0.9.5a 1 Apr 2000".
61
62=item SSLEAY_CFLAGS
63
64The compiler flags set for the compilation process in the form
65"compiler: ..." if available or "compiler: information not available"
66otherwise.
67
68=item SSLEAY_BUILT_ON
69
70The date of the build process in the form "built on: ..." if available
71or "built on: date not available" otherwise.
72
73=item SSLEAY_PLATFORM
74
75The "Configure" target of the library build in the form "platform: ..."
76if available or "platform: information not available" otherwise.
77
78=item SSLEAY_DIR
79
80The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR: "...""
81if available or "OPENSSLDIR: N/A" otherwise.
82
83=back
84
85For an unknown B<t>, the text "not available" is returned.
86
87=head1 RETURN VALUE
88
89The version number.
90
91=head1 SEE ALSO
92
93L<crypto(3)|crypto(3)>
94
95=head1 HISTORY
96
97SSLeay() and SSLEAY_VERSION_NUMBER are available in all versions of SSLeay and
98OpenSSL. OPENSSL_VERSION_NUMBER is available in all versions of OpenSSL.
99B<SSLEAY_DIR> was added in OpenSSL 0.9.7.
100
101=cut
diff --git a/src/lib/libcrypto/doc/OPENSSL_config.pod b/src/lib/libcrypto/doc/OPENSSL_config.pod
deleted file mode 100644
index 897d2cce59..0000000000
--- a/src/lib/libcrypto/doc/OPENSSL_config.pod
+++ /dev/null
@@ -1,82 +0,0 @@
1=pod
2
3=head1 NAME
4
5OPENSSL_config, OPENSSL_no_config - simple OpenSSL configuration functions
6
7=head1 SYNOPSIS
8
9 #include <openssl/conf.h>
10
11 void OPENSSL_config(const char *config_name);
12 void OPENSSL_no_config(void);
13
14=head1 DESCRIPTION
15
16OPENSSL_config() configures OpenSSL using the standard B<openssl.cnf>
17configuration file name using B<config_name>. If B<config_name> is NULL then
18the default name B<openssl_conf> will be used. Any errors are ignored. Further
19calls to OPENSSL_config() will have no effect. The configuration file format
20is documented in the L<conf(5)|conf(5)> manual page.
21
22OPENSSL_no_config() disables configuration. If called before OPENSSL_config()
23no configuration takes place.
24
25=head1 NOTES
26
27It is B<strongly> recommended that B<all> new applications call OPENSSL_config()
28or the more sophisticated functions such as CONF_modules_load() during
29initialization (that is before starting any threads). By doing this
30an application does not need to keep track of all configuration options
31and some new functionality can be supported automatically.
32
33It is also possible to automatically call OPENSSL_config() when an application
34calls OPENSSL_add_all_algorithms() by compiling an application with the
35preprocessor symbol B<OPENSSL_LOAD_CONF> #define'd. In this way configuration
36can be added without source changes.
37
38The environment variable B<OPENSSL_CONF> can be set to specify the location
39of the configuration file.
40
41Currently ASN1 OBJECTs and ENGINE configuration can be performed future
42versions of OpenSSL will add new configuration options.
43
44There are several reasons why calling the OpenSSL configuration routines is
45advisable. For example new ENGINE functionality was added to OpenSSL 0.9.7.
46In OpenSSL 0.9.7 control functions can be supported by ENGINEs, this can be
47used (among other things) to load dynamic ENGINEs from shared libraries (DSOs).
48However very few applications currently support the control interface and so
49very few can load and use dynamic ENGINEs. Equally in future more sophisticated
50ENGINEs will require certain control operations to customize them. If an
51application calls OPENSSL_config() it doesn't need to know or care about
52ENGINE control operations because they can be performed by editing a
53configuration file.
54
55Applications should free up configuration at application closedown by calling
56CONF_modules_free().
57
58=head1 RESTRICTIONS
59
60The OPENSSL_config() function is designed to be a very simple "call it and
61forget it" function. As a result its behaviour is somewhat limited. It ignores
62all errors silently and it can only load from the standard configuration file
63location for example.
64
65It is however B<much> better than nothing. Applications which need finer
66control over their configuration functionality should use the configuration
67functions such as CONF_load_modules() directly.
68
69=head1 RETURN VALUES
70
71Neither OPENSSL_config() nor OPENSSL_no_config() return a value.
72
73=head1 SEE ALSO
74
75L<conf(5)|conf(5)>, L<CONF_load_modules_file(3)|CONF_load_modules_file(3)>,
76L<CONF_modules_free(3)|CONF_modules_free(3)>
77
78=head1 HISTORY
79
80OPENSSL_config() and OPENSSL_no_config() first appeared in OpenSSL 0.9.7
81
82=cut
diff --git a/src/lib/libcrypto/doc/OPENSSL_load_builtin_modules.pod b/src/lib/libcrypto/doc/OPENSSL_load_builtin_modules.pod
deleted file mode 100644
index 828fec651d..0000000000
--- a/src/lib/libcrypto/doc/OPENSSL_load_builtin_modules.pod
+++ /dev/null
@@ -1,51 +0,0 @@
1=pod
2
3=head1 NAME
4
5OPENSSL_load_builtin_modules, ASN1_add_oid_module, ENGINE_add_conf_module - add standard configuration modules
6
7=head1 SYNOPSIS
8
9 #include <openssl/conf.h>
10
11 void OPENSSL_load_builtin_modules(void);
12 void ASN1_add_oid_module(void);
13 ENGINE_add_conf_module();
14
15=head1 DESCRIPTION
16
17The function OPENSSL_load_builtin_modules() adds all the standard OpenSSL
18configuration modules to the internal list. They can then be used by the
19OpenSSL configuration code.
20
21ASN1_add_oid_module() adds just the ASN1 OBJECT module.
22
23ENGINE_add_conf_module() adds just the ENGINE configuration module.
24
25=head1 NOTES
26
27If the simple configuration function OPENSSL_config() is called then
28OPENSSL_load_builtin_modules() is called automatically.
29
30Applications which use the configuration functions directly will need to
31call OPENSSL_load_builtin_modules() themselves I<before> any other
32configuration code.
33
34Applications should call OPENSSL_load_builtin_modules() to load all
35configuration modules instead of adding modules selectively: otherwise
36functionality may be missing from the application if an when new
37modules are added.
38
39=head1 RETURN VALUE
40
41None of the functions return a value.
42
43=head1 SEE ALSO
44
45L<conf(3)|conf(3)>, L<OPENSSL_config(3)|OPENSSL_config(3)>
46
47=head1 HISTORY
48
49These functions first appeared in OpenSSL 0.9.7.
50
51=cut
diff --git a/src/lib/libcrypto/doc/OpenSSL_add_all_algorithms.pod b/src/lib/libcrypto/doc/OpenSSL_add_all_algorithms.pod
deleted file mode 100644
index 1bba4d0212..0000000000
--- a/src/lib/libcrypto/doc/OpenSSL_add_all_algorithms.pod
+++ /dev/null
@@ -1,66 +0,0 @@
1=pod
2
3=head1 NAME
4
5OpenSSL_add_all_algorithms, OpenSSL_add_all_ciphers, OpenSSL_add_all_digests, EVP_cleanup -
6add algorithms to internal table
7
8=head1 SYNOPSIS
9
10 #include <openssl/evp.h>
11
12 void OpenSSL_add_all_algorithms(void);
13 void OpenSSL_add_all_ciphers(void);
14 void OpenSSL_add_all_digests(void);
15
16 void EVP_cleanup(void);
17
18=head1 DESCRIPTION
19
20OpenSSL keeps an internal table of digest algorithms and ciphers. It uses
21this table to lookup ciphers via functions such as EVP_get_cipher_byname().
22
23OpenSSL_add_all_digests() adds all digest algorithms to the table.
24
25OpenSSL_add_all_algorithms() adds all algorithms to the table (digests and
26ciphers).
27
28OpenSSL_add_all_ciphers() adds all encryption algorithms to the table including
29password based encryption algorithms.
30
31EVP_cleanup() removes all ciphers and digests from the table.
32
33=head1 RETURN VALUES
34
35None of the functions return a value.
36
37=head1 NOTES
38
39A typical application will call OpenSSL_add_all_algorithms() initially and
40EVP_cleanup() before exiting.
41
42An application does not need to add algorithms to use them explicitly, for
43example by EVP_sha1(). It just needs to add them if it (or any of the functions
44it calls) needs to lookup algorithms.
45
46The cipher and digest lookup functions are used in many parts of the library.
47If the table is not initialized several functions will misbehave and complain
48they cannot find algorithms. This includes the PEM, PKCS#12, SSL and S/MIME
49libraries. This is a common query in the OpenSSL mailing lists.
50
51Calling OpenSSL_add_all_algorithms() links in all algorithms: as a result a
52statically linked executable can be quite large. If this is important it is
53possible to just add the required ciphers and digests.
54
55=head1 BUGS
56
57Although the functions do not return error codes it is possible for them to
58fail. This will only happen as a result of a memory allocation failure so this
59is not too much of a problem in practice.
60
61=head1 SEE ALSO
62
63L<evp(3)|evp(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)>,
64L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>
65
66=cut
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile
index 802b34399f..17efba0d08 100644
--- a/src/lib/libcrypto/man/Makefile
+++ b/src/lib/libcrypto/man/Makefile
@@ -1,4 +1,4 @@
1# $OpenBSD: Makefile,v 1.40 2016/11/03 10:24:26 schwarze Exp $ 1# $OpenBSD: Makefile,v 1.41 2016/11/03 12:21:50 schwarze Exp $
2 2
3.include <bsd.own.mk> # for NOMAN 3.include <bsd.own.mk> # for NOMAN
4 4
@@ -118,6 +118,10 @@ MAN= \
118 HMAC.3 \ 118 HMAC.3 \
119 MD5.3 \ 119 MD5.3 \
120 OBJ_nid2obj.3 \ 120 OBJ_nid2obj.3 \
121 OPENSSL_VERSION_NUMBER.3 \
122 OPENSSL_config.3 \
123 OPENSSL_load_builtin_modules.3 \
124 OpenSSL_add_all_algorithms.3 \
121 UI_new.3 \ 125 UI_new.3 \
122 bn_dump.3 \ 126 bn_dump.3 \
123 crypto.3 \ 127 crypto.3 \
@@ -128,10 +132,6 @@ MAN= \
128 lh_new.3 \ 132 lh_new.3 \
129 133
130GENMAN= \ 134GENMAN= \
131 OPENSSL_VERSION_NUMBER.3 \
132 OPENSSL_config.3 \
133 OPENSSL_load_builtin_modules.3 \
134 OpenSSL_add_all_algorithms.3 \
135 PKCS5_PBKDF2_HMAC.3 \ 135 PKCS5_PBKDF2_HMAC.3 \
136 PEM_read_bio_PrivateKey.3 \ 136 PEM_read_bio_PrivateKey.3 \
137 PEM_write_bio_PKCS7_stream.3 \ 137 PEM_write_bio_PKCS7_stream.3 \
diff --git a/src/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 b/src/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3
new file mode 100644
index 0000000000..660a964427
--- /dev/null
+++ b/src/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3
@@ -0,0 +1,96 @@
1.Dd $Mdocdate: November 3 2016 $
2.Dt OPENSSL_VERSION_NUMBER 3
3.Os
4.Sh NAME
5.Nm OPENSSL_VERSION_NUMBER ,
6.Nm SSLeay ,
7.Nm SSLeay_version
8.Nd get OpenSSL version number
9.Sh SYNOPSIS
10.In openssl/opensslv.h
11.Fd #define OPENSSL_VERSION_NUMBER 0xnnnnnnnnnL
12.In openssl/crypto.h
13.Ft long
14.Fn SSLeay void
15.Ft const char *
16.Fo SSLeay_version
17.Fa "int t"
18.Fc
19.Sh DESCRIPTION
20.Dv OPENSSL_VERSION_NUMBER
21is a numeric release version identifier.
22The first two digits contain the major release number,
23the third and fourth digits the minor release number,
24the fifth and sixth digits the fix release number,
25the seventh and eight digits the patch release number.
26The final digit is 0 for development, 1 to e for betas 1 to 14, or f
27for release.
28.Pp
29For example:
30.Bd -literal -offset indent
310x000906000 == 0.9.6 dev
320x000906023 == 0.9.6b beta 3
330x00090605f == 0.9.6e release
34.Ed
35.Pp
36Versions prior to 0.9.3 had identifiers < 0x0930.
37For versions between 0.9.3 and 0.9.5,
38the seventh digit was 1 for release and 0 otherwise,
39and the eighth and ninth digits were the patch release number.
40.Pp
41For example:
42.Bd -literal
430x000904100 == 0.9.4 release
440x000905000 == 0.9.5 dev
45.Ed
46.Pp
47Version 0.9.5a had an interim interpretation that is like the current
48one, except the patch level got the highest bit set, to keep continuity.
49The number was therefore 0x0090581f.
50.Pp
51For backward compatibility, SSLEAY_VERSION_NUMBER is also defined.
52.Pp
53.Fn SSLeay
54returns this number.
55The return value can be compared to the macro to make sure that the
56correct version of the library has been loaded, especially when using
57DLLs on Windows systems.
58.Pp
59.Fn SSLeay_version
60returns different strings depending on
61.Fa t :
62.Bl -tag -width Ds
63.It Dv SSLEAY_VERSION
64The text variant of the version number and the release date.
65For example, "OpenSSL 0.9.5a 1 Apr 2000".
66.It Dv SSLEAY_CFLAGS
67The compiler flags set for the compilation process in the form
68"compiler: ..." if available or "compiler: information not available"
69otherwise.
70.It Dv SSLEAY_BUILT_ON
71The date of the build process in the form "built on: ..." if available
72or "built on: date not available" otherwise.
73.It Dv SSLEAY_PLATFORM
74The "Configure" target of the library build in the form "platform: ..."
75if available or "platform: information not available" otherwise.
76.It Dv SSLEAY_DIR
77The "OPENSSLDIR" setting of the library build in the form "OPENSSLDIR:
78"..."" if available or "OPENSSLDIR: N/A" otherwise.
79.El
80.Pp
81For an unknown
82.Fa t ,
83the text "not available" is returned.
84.Sh RETURN VALUE
85The version number.
86.Sh SEE ALSO
87.Xr crypto 3
88.Sh HISTORY
89.Fn SSLeay
90and
91.Dv SSLEAY_VERSION_NUMBER
92are available in all versions of SSLeay and OpenSSL.
93.Dv OPENSSL_VERSION_NUMBER
94is available in all versions of OpenSSL.
95.Dv SSLEAY_DIR
96was added in OpenSSL 0.9.7.
diff --git a/src/lib/libcrypto/man/OPENSSL_config.3 b/src/lib/libcrypto/man/OPENSSL_config.3
new file mode 100644
index 0000000000..a944ba7b4e
--- /dev/null
+++ b/src/lib/libcrypto/man/OPENSSL_config.3
@@ -0,0 +1,115 @@
1.Dd $Mdocdate: November 3 2016 $
2.Dt OPENSSL_CONFIG 3
3.Os
4.Sh NAME
5.Nm OPENSSL_config ,
6.Nm OPENSSL_no_config
7.Nd simple OpenSSL configuration functions
8.Sh SYNOPSIS
9.In openssl/conf.h
10.Ft void
11.Fo OPENSSL_config
12.Fa "const char *config_name"
13.Fc
14.Ft void
15.Fn OPENSSL_no_config void
16.Sh DESCRIPTION
17.Fn OPENSSL_config
18configures OpenSSL using the standard
19.Pa openssl.cnf
20configuration file name using
21.Fa config_name .
22If
23.Fa config_name
24is
25.Dv NULL
26then the default name
27.Sy openssl_conf
28will be used.
29Any errors are ignored.
30Further calls to
31.Fn OPENSSL_config
32will have no effect.
33.Pp
34.Fn OPENSSL_no_config
35disables configuration.
36If called before
37.Fn OPENSSL_config ,
38no configuration takes place.
39.Pp
40It is
41.Sy strongly
42recommended that
43.Sy all
44new applications call
45.Fn OPENSSL_config
46or the more sophisticated functions such as
47.Xr CONF_modules_load 3
48during initialization (that is before starting any threads).
49By doing this, an application does not need to keep track of all
50configuration options and some new functionality can be supported
51automatically.
52.Pp
53It is also possible to automatically call
54.Fn OPENSSL_config
55when an application calls
56.Xr OPENSSL_add_all_algorithms 3
57by compiling an application with the preprocessor symbol
58.Dv OPENSSL_LOAD_CONF
59#define'd.
60In this way configuration can be added without source changes.
61.Pp
62The environment variable
63.Ev OPENSSL_CONF
64can be set to specify the location of the configuration file.
65.Pp
66Currently ASN1 OBJECT and ENGINE configuration can be performed.
67.Pp
68There are several reasons why calling the OpenSSL configuration routines
69is advisable.
70For example new ENGINE functionality was added to OpenSSL 0.9.7.
71In OpenSSL 0.9.7 control functions can be supported by ENGINEs, this can be
72used (among other things) to load dynamic ENGINEs from shared libraries
73(DSOs).
74However very few applications currently support the control interface
75and so very few can load and use dynamic ENGINEs.
76Equally in future more sophisticated ENGINEs will require certain
77control operations to customize them.
78If an application calls
79.Fn OPENSSL_config
80it doesn't need to know or care about ENGINE control operations because
81they can be performed by editing a configuration file.
82.Pp
83Applications should free up configuration at application closedown by
84calling
85.Xr CONF_modules_free 3 .
86.Sh RETURN VALUES
87Neither
88.Fn OPENSSL_config
89nor
90.Fn OPENSSL_no_config
91return a value.
92.Sh SEE ALSO
93.Xr CONF_modules_free 3 ,
94.Xr CONF_modules_load 3
95.Sh HISTORY
96.Fn OPENSSL_config
97and
98.Fn OPENSSL_no_config
99first appeared in OpenSSL 0.9.7.
100.Sh CAVEATS
101The
102.Fn OPENSSL_config
103function is designed to be a very simple "call it and forget it"
104function.
105As a result its behaviour is somewhat limited.
106It ignores all errors silently and it can only load from the standard
107configuration file location for example.
108.Pp
109It is however
110.Sy much
111better than nothing.
112Applications which need finer control over their configuration
113functionality should use the configuration functions such as
114.Xr CONF_load_modules 3
115directly.
diff --git a/src/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 b/src/lib/libcrypto/man/OPENSSL_load_builtin_modules.3
new file mode 100644
index 0000000000..2a107ab7c4
--- /dev/null
+++ b/src/lib/libcrypto/man/OPENSSL_load_builtin_modules.3
@@ -0,0 +1,53 @@
1.Dd $Mdocdate: November 3 2016 $
2.Dt OPENSSL_LOAD_BUILTIN_MODULES 3
3.Os
4.Sh NAME
5.Nm OPENSSL_load_builtin_modules ,
6.Nm ASN1_add_oid_module ,
7.Nm ENGINE_add_conf_module
8.Nd add standard configuration modules
9.Sh SYNOPSIS
10.In openssl/conf.h
11.Ft void
12.Fn OPENSSL_load_builtin_modules void
13.Ft void
14.Fn ASN1_add_oid_module void
15.Ft void
16.Fn ENGINE_add_conf_module void
17.Sh DESCRIPTION
18The function
19.Fn OPENSSL_load_builtin_modules
20adds all the standard OpenSSL configuration modules to the internal
21list.
22They can then be used by the OpenSSL configuration code.
23.Pp
24.Fn ASN1_add_oid_module
25adds just the ASN1 OBJECT module.
26.Pp
27.Fn ENGINE_add_conf_module
28adds just the ENGINE configuration module.
29.Pp
30If the simple configuration function
31.Xr OPENSSL_config 3
32is called then
33.Fn OPENSSL_load_builtin_modules
34is called automatically.
35.Pp
36Applications which use the configuration functions directly will need to
37call
38.Fn OPENSSL_load_builtin_modules
39themselves
40.Em before
41any other configuration code.
42.Pp
43Applications should call
44.Fn OPENSSL_load_builtin_modules
45to load all configuration modules instead of adding modules selectively:
46otherwise functionality may be missing from the application when
47new modules are added.
48.Sh RETURN VALUE
49None of the functions return a value.
50.Sh SEE ALSO
51.Xr OPENSSL_config 3
52.Sh HISTORY
53These functions first appeared in OpenSSL 0.9.7.
diff --git a/src/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 b/src/lib/libcrypto/man/OpenSSL_add_all_algorithms.3
new file mode 100644
index 0000000000..b6e93a939e
--- /dev/null
+++ b/src/lib/libcrypto/man/OpenSSL_add_all_algorithms.3
@@ -0,0 +1,71 @@
1.Dd $Mdocdate: November 3 2016 $
2.Dt OPENSSL_ADD_ALL_ALGORITHMS 3
3.Os
4.Sh NAME
5.Nm OpenSSL_add_all_algorithms ,
6.Nm OpenSSL_add_all_ciphers ,
7.Nm OpenSSL_add_all_digests ,
8.Nm EVP_cleanup
9.Nd add algorithms to internal table
10.Sh SYNOPSIS
11.In openssl/evp.h
12.Ft void
13.Fn OpenSSL_add_all_algorithms void
14.Ft void
15.Fn OpenSSL_add_all_ciphers void
16.Ft void
17.Fn OpenSSL_add_all_digests void
18.Ft void
19.Fn EVP_cleanup void
20.Sh DESCRIPTION
21OpenSSL keeps an internal table of digest algorithms and ciphers.
22It uses this table to lookup ciphers via functions such as
23.Xr EVP_get_cipherbyname 3 .
24.Pp
25.Fn OpenSSL_add_all_algorithms
26adds all algorithms to the table (digests and ciphers).
27.Pp
28.Fn OpenSSL_add_all_digests
29adds all digest algorithms to the table.
30.Pp
31.Fn OpenSSL_add_all_ciphers
32adds all encryption algorithms to the table including password based
33encryption algorithms.
34.Pp
35.Fn EVP_cleanup
36removes all ciphers and digests from the table.
37.Pp
38A typical application will call
39.Fn OpenSSL_add_all_algorithms
40initially and
41.Fn EVP_cleanup
42before exiting.
43.Pp
44An application does not need to add algorithms to use them explicitly,
45for example by
46.Xr EVP_sha1 3 .
47It just needs to add them if it (or any of the functions it calls) needs
48to lookup algorithms.
49.Pp
50The cipher and digest lookup functions are used in many parts of the
51library.
52If the table is not initialized, several functions will misbehave and
53complain they cannot find algorithms.
54This includes the PEM, PKCS#12, SSL and S/MIME libraries.
55This is a common query in the OpenSSL mailing lists.
56.Pp
57Calling
58.Fn OpenSSL_add_all_algorithms
59links in all algorithms: as a result a statically linked executable can
60be quite large.
61If this is important, it is possible to just add the required ciphers and
62digests.
63.Sh SEE ALSO
64.Xr evp 3 ,
65.Xr EVP_DigestInit 3 ,
66.Xr EVP_EncryptInit 3
67.Sh BUGS
68Although the functions do not return error codes, it is possible for them
69to fail.
70This will only happen as a result of a memory allocation failure so this
71is not too much of a problem in practice.