xref: /onnv-gate/usr/src/common/openssl/doc/ssl/SSL_library_init.pod (revision 2175:b0b2f052a486)
1*2175Sjp161948=pod
2*2175Sjp161948
3*2175Sjp161948=head1 NAME
4*2175Sjp161948
5*2175Sjp161948SSL_library_init, OpenSSL_add_ssl_algorithms, SSLeay_add_ssl_algorithms
6*2175Sjp161948- initialize SSL library by registering algorithms
7*2175Sjp161948
8*2175Sjp161948=head1 SYNOPSIS
9*2175Sjp161948
10*2175Sjp161948 #include <openssl/ssl.h>
11*2175Sjp161948
12*2175Sjp161948 int SSL_library_init(void);
13*2175Sjp161948 #define OpenSSL_add_ssl_algorithms()    SSL_library_init()
14*2175Sjp161948 #define SSLeay_add_ssl_algorithms()     SSL_library_init()
15*2175Sjp161948
16*2175Sjp161948=head1 DESCRIPTION
17*2175Sjp161948
18*2175Sjp161948SSL_library_init() registers the available ciphers and digests.
19*2175Sjp161948
20*2175Sjp161948OpenSSL_add_ssl_algorithms() and SSLeay_add_ssl_algorithms() are synonyms
21*2175Sjp161948for SSL_library_init().
22*2175Sjp161948
23*2175Sjp161948=head1 NOTES
24*2175Sjp161948
25*2175Sjp161948SSL_library_init() must be called before any other action takes place.
26*2175Sjp161948
27*2175Sjp161948=head1 WARNING
28*2175Sjp161948
29*2175Sjp161948SSL_library_init() only registers ciphers. Another important initialization
30*2175Sjp161948is the seeding of the PRNG (Pseudo Random Number Generator), which has to
31*2175Sjp161948be performed separately.
32*2175Sjp161948
33*2175Sjp161948=head1 EXAMPLES
34*2175Sjp161948
35*2175Sjp161948A typical TLS/SSL application will start with the library initialization,
36*2175Sjp161948will provide readable error messages and will seed the PRNG.
37*2175Sjp161948
38*2175Sjp161948 SSL_load_error_strings();                /* readable error messages */
39*2175Sjp161948 SSL_library_init();                      /* initialize library */
40*2175Sjp161948 actions_to_seed_PRNG();
41*2175Sjp161948
42*2175Sjp161948=head1 RETURN VALUES
43*2175Sjp161948
44*2175Sjp161948SSL_library_init() always returns "1", so it is safe to discard the return
45*2175Sjp161948value.
46*2175Sjp161948
47*2175Sjp161948=head1 SEE ALSO
48*2175Sjp161948
49*2175Sjp161948L<ssl(3)|ssl(3)>, L<SSL_load_error_strings(3)|SSL_load_error_strings(3)>,
50*2175Sjp161948L<RAND_add(3)|RAND_add(3)>
51*2175Sjp161948
52*2175Sjp161948=cut
53