xref: /onnv-gate/usr/src/common/openssl/doc/ssl/SSL_new.pod (revision 2175:b0b2f052a486)
1*2175Sjp161948=pod
2*2175Sjp161948
3*2175Sjp161948=head1 NAME
4*2175Sjp161948
5*2175Sjp161948SSL_new - create a new SSL structure for a connection
6*2175Sjp161948
7*2175Sjp161948=head1 SYNOPSIS
8*2175Sjp161948
9*2175Sjp161948 #include <openssl/ssl.h>
10*2175Sjp161948
11*2175Sjp161948 SSL *SSL_new(SSL_CTX *ctx);
12*2175Sjp161948
13*2175Sjp161948=head1 DESCRIPTION
14*2175Sjp161948
15*2175Sjp161948SSL_new() creates a new B<SSL> structure which is needed to hold the
16*2175Sjp161948data for a TLS/SSL connection. The new structure inherits the settings
17*2175Sjp161948of the underlying context B<ctx>: connection method (SSLv2/v3/TLSv1),
18*2175Sjp161948options, verification settings, timeout settings.
19*2175Sjp161948
20*2175Sjp161948=head1 RETURN VALUES
21*2175Sjp161948
22*2175Sjp161948The following return values can occur:
23*2175Sjp161948
24*2175Sjp161948=over 4
25*2175Sjp161948
26*2175Sjp161948=item NULL
27*2175Sjp161948
28*2175Sjp161948The creation of a new SSL structure failed. Check the error stack to
29*2175Sjp161948find out the reason.
30*2175Sjp161948
31*2175Sjp161948=item Pointer to an SSL structure
32*2175Sjp161948
33*2175Sjp161948The return value points to an allocated SSL structure.
34*2175Sjp161948
35*2175Sjp161948=back
36*2175Sjp161948
37*2175Sjp161948=head1 SEE ALSO
38*2175Sjp161948
39*2175Sjp161948L<SSL_free(3)|SSL_free(3)>, L<SSL_clear(3)|SSL_clear(3)>,
40*2175Sjp161948L<SSL_CTX_set_options(3)|SSL_CTX_set_options(3)>,
41*2175Sjp161948L<SSL_get_SSL_CTX(3)|SSL_get_SSL_CTX(3)>,
42*2175Sjp161948L<ssl(3)|ssl(3)>
43*2175Sjp161948
44*2175Sjp161948=cut
45