Remove obsolete PRNG note. Add comment about use of SHA256 et al.
[openssl.git] / doc / ssl / SSL_library_init.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_library_init, OpenSSL_add_ssl_algorithms, SSLeay_add_ssl_algorithms
6 - initialize SSL library by registering algorithms
7
8 =head1 SYNOPSIS
9
10  #include <openssl/ssl.h>
11
12  int SSL_library_init(void);
13  #define OpenSSL_add_ssl_algorithms()    SSL_library_init()
14  #define SSLeay_add_ssl_algorithms()     SSL_library_init()
15
16 =head1 DESCRIPTION
17
18 SSL_library_init() registers the available SSL/TLS ciphers and digests.
19
20 OpenSSL_add_ssl_algorithms() and SSLeay_add_ssl_algorithms() are synonyms
21 for SSL_library_init().
22
23 =head1 NOTES
24
25 SSL_library_init() must be called before any other action takes place.
26 SSL_library_init() is not reentrant. 
27
28 =head1 WARNING
29
30 SSL_library_init() mainly adds ciphers and digests used directly by SSL/TLS.
31 In some cases this is not sufficient and errors about unknown algorithms
32 will occur: for example when an attempt is made to use a certificate using
33 SHA256. This can be resolved by also calling OpenSSL_add_all_algorithms().
34
35 =head1 EXAMPLES
36
37 A typical TLS/SSL application will start with the library initialization,
38 will provide readable error messages and will seed the PRNG.
39
40  SSL_load_error_strings();                /* readable error messages */
41  SSL_library_init();                      /* initialize library */
42  actions_to_seed_PRNG(); 
43
44 =head1 RETURN VALUES
45
46 SSL_library_init() always returns "1", so it is safe to discard the return
47 value.
48
49 =head1 SEE ALSO
50
51 L<ssl(3)|ssl(3)>, L<SSL_load_error_strings(3)|SSL_load_error_strings(3)>,
52 L<RAND_add(3)|RAND_add(3)>
53
54 =cut