xref: /openbsd-src/lib/libssl/man/SSL_SESSION_print.3 (revision c90a81c56dcebd6a1b73fe4aff9b03385b8e63b3)
1.\"	$OpenBSD: SSL_SESSION_print.3,v 1.3 2018/03/27 17:35:50 schwarze Exp $
2.\"
3.\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4.\"
5.\" Permission to use, copy, modify, and distribute this software for any
6.\" purpose with or without fee is hereby granted, provided that the above
7.\" copyright notice and this permission notice appear in all copies.
8.\"
9.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.\"
17.Dd $Mdocdate: March 27 2018 $
18.Dt SSL_SESSION_PRINT 3
19.Os
20.Sh NAME
21.Nm SSL_SESSION_print ,
22.Nm SSL_SESSION_print_fp
23.Nd print some properties of an SSL_SESSION object
24.Sh SYNOPSIS
25.In openssl/ssl.h
26.Ft int
27.Fo SSL_SESSION_print
28.Fa "BIO *bp"
29.Fa "const SSL_SESSION *session"
30.Fc
31.Ft int
32.Fo SSL_SESSION_print_fp
33.Fa "FILE *fp"
34.Fa "const SSL_SESSION *session"
35.Fc
36.Sh DESCRIPTION
37.Fn SSL_SESSION_print
38prints some properties of
39.Fa session
40in a human-readable format to the
41.Fa "BIO *bp" ,
42including protocol version, cipher name, session ID,
43session ID context, master key, session ticket lifetime hint,
44session ticket, start time, timeout, and verify return code.
45.Pp
46.Fn SSL_SESSION_print_fp
47does the same as
48.Fn SSL_SESSION_print
49except that it prints to the
50.Fa "FILE *fp" .
51.Sh RETURN VALUES
52.Fn SSL_SESSION_print
53and
54.Fn SSL_SESSION_print_fp
55return 1 for success or 0 for failure.
56.Pp
57In some cases, the reason for failure can be determined with
58.Xr ERR_get_error 3 .
59.Sh SEE ALSO
60.Xr d2i_SSL_SESSION 3 ,
61.Xr PEM_read_SSL_SESSION 3 ,
62.Xr SSL_get_session 3 ,
63.Xr SSL_SESSION_free 3 ,
64.Xr SSL_SESSION_get_ex_new_index 3 ,
65.Xr SSL_SESSION_get_time 3 ,
66.Xr SSL_SESSION_new 3
67.Sh HISTORY
68.Fn SSL_SESSION_print
69first appeared in SSLeay 0.5.2.
70.Fn SSL_SESSION_print_fp
71first appeared in SSLeay 0.6.0.
72Both functions have been available since
73.Ox 2.4 .
74