summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-12-06 18:40:32 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-12-06 18:40:32 +0000
commit18d811f0d66796ad442c761324c5d01ea83e5001 (patch)
treec0a2a764ebaafeb284378c9e9485f03a43029ee6 /lib/libssl
parent56709eef1a6f0dcb6edf78724b5dd1db7d5006bc (diff)
New manual page SSL_SESSION_new(3) written from scratch.
The function prototype is listed in ssl(3) and <openssl/ssl.h>, so it's clearly a public interface, but OpenSSL has no documentation about it whatsoever.
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/man/Makefile3
-rw-r--r--lib/libssl/man/SSL_SESSION_new.362
2 files changed, 64 insertions, 1 deletions
diff --git a/lib/libssl/man/Makefile b/lib/libssl/man/Makefile
index c2176f10229..a07231f19fa 100644
--- a/lib/libssl/man/Makefile
+++ b/lib/libssl/man/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.44 2016/12/01 21:12:49 schwarze Exp $
+# $OpenBSD: Makefile,v 1.45 2016/12/06 18:40:31 schwarze Exp $
.include <bsd.own.mk>
@@ -48,6 +48,7 @@ MAN = BIO_f_ssl.3 \
SSL_SESSION_free.3 \
SSL_SESSION_get_ex_new_index.3 \
SSL_SESSION_get_time.3 \
+ SSL_SESSION_new.3 \
SSL_accept.3 \
SSL_alert_type_string.3 \
SSL_clear.3 \
diff --git a/lib/libssl/man/SSL_SESSION_new.3 b/lib/libssl/man/SSL_SESSION_new.3
new file mode 100644
index 00000000000..77e77e9105e
--- /dev/null
+++ b/lib/libssl/man/SSL_SESSION_new.3
@@ -0,0 +1,62 @@
+.\" $OpenBSD: SSL_SESSION_new.3,v 1.1 2016/12/06 18:40:31 schwarze Exp $
+.\"
+.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: December 6 2016 $
+.Dt SSL_SESSION_NEW 3
+.Os
+.Sh NAME
+.Nm SSL_SESSION_new
+.Nd construct a new SSL_SESSION object
+.Sh SYNOPSIS
+.In openssl/ssl.h
+.Ft SSL_SESSION *
+.Fn SSL_SESSION_new void
+.Sh DESCRIPTION
+.Fn SSL_SESSION_new
+allocates and initializes an new
+.Vt SSL_SESSION
+object.
+The reference count is set to 1, the time to the current time, and
+the timeout to five minutes.
+.Pp
+When the object is no longer needed, it can be destructed with
+.Xr SSL_SESSION_free 3 .
+.Pp
+.Fn SSL_SESSION_new
+is used internally, for example by
+.Xr SSL_connect 3 .
+.Sh RETURN VALUES
+.Fn SSL_SESSION_new
+returns the new
+.Vt SSL_SESSION
+object or
+.Dv NULL
+if insufficient memory is available.
+.Pp
+After failure,
+.Xr ERR_get_error 3
+returns
+.Dv ERR_R_MALLOC_FAILURE .
+.Sh SEE ALSO
+.Xr d2i_SSL_SESSION 3 ,
+.Xr PEM_read_SSL_SESSION 3 ,
+.Xr SSL_connect 3 ,
+.Xr SSL_CTX_add_session 3 ,
+.Xr SSL_get_session 3 ,
+.Xr SSL_SESSION_free 3 ,
+.Xr SSL_SESSION_get_ex_new_index 3 ,
+.Xr SSL_SESSION_get_time 3 ,
+.Xr SSL_set_session 3