diff options
author | schwarze <> | 2018-02-27 02:59:38 +0000 |
---|---|---|
committer | schwarze <> | 2018-02-27 02:59:38 +0000 |
commit | c21b6c12413a6f65811e18e20da3a0c659d04215 (patch) | |
tree | c877b014272eff5cdb4fb2244eb15e933e070b61 | |
parent | 3af48992f1c9c84b3f3ddaa905bc0e14d5aeda70 (diff) | |
download | openbsd-c21b6c12413a6f65811e18e20da3a0c659d04215.tar.gz openbsd-c21b6c12413a6f65811e18e20da3a0c659d04215.tar.bz2 openbsd-c21b6c12413a6f65811e18e20da3a0c659d04215.zip |
In ssl.h rev. 1.145 2018/02/22 17:30:25, jsing@ provided SSL_is_server(3).
Merge the documentation from OpenSSL, slightliy tweaking the wording
for precision. The connection is not necessarily "working" yet.
-rw-r--r-- | src/lib/libssl/man/SSL_set_connect_state.3 | 43 |
1 files changed, 34 insertions, 9 deletions
diff --git a/src/lib/libssl/man/SSL_set_connect_state.3 b/src/lib/libssl/man/SSL_set_connect_state.3 index 67e2545cef..5da4aa2cff 100644 --- a/src/lib/libssl/man/SSL_set_connect_state.3 +++ b/src/lib/libssl/man/SSL_set_connect_state.3 | |||
@@ -1,8 +1,10 @@ | |||
1 | .\" $OpenBSD: SSL_set_connect_state.3,v 1.2 2016/12/04 12:20:54 schwarze Exp $ | 1 | .\" $OpenBSD: SSL_set_connect_state.3,v 1.3 2018/02/27 02:59:38 schwarze Exp $ |
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | 2 | .\" full merge up to OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 |
3 | .\" selective merge up to: OpenSSL dbd007d7 Jul 28 13:31:27 2017 +0800 | ||
3 | .\" | 4 | .\" |
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | 5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> |
5 | .\" Copyright (c) 2001, 2002 The OpenSSL Project. All rights reserved. | 6 | .\" and Paul Yang <yang.yang@baishancloud.com>. |
7 | .\" Copyright (c) 2001, 2017 The OpenSSL Project. All rights reserved. | ||
6 | .\" | 8 | .\" |
7 | .\" Redistribution and use in source and binary forms, with or without | 9 | .\" Redistribution and use in source and binary forms, with or without |
8 | .\" modification, are permitted provided that the following conditions | 10 | .\" modification, are permitted provided that the following conditions |
@@ -48,12 +50,13 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 52 | .\" |
51 | .Dd $Mdocdate: December 4 2016 $ | 53 | .Dd $Mdocdate: February 27 2018 $ |
52 | .Dt SSL_SET_CONNECT_STATE 3 | 54 | .Dt SSL_SET_CONNECT_STATE 3 |
53 | .Os | 55 | .Os |
54 | .Sh NAME | 56 | .Sh NAME |
55 | .Nm SSL_set_connect_state , | 57 | .Nm SSL_set_connect_state , |
56 | .Nm SSL_set_accept_state | 58 | .Nm SSL_set_accept_state , |
59 | .Nm SSL_is_server | ||
57 | .Nd prepare SSL object to work in client or server mode | 60 | .Nd prepare SSL object to work in client or server mode |
58 | .Sh SYNOPSIS | 61 | .Sh SYNOPSIS |
59 | .In openssl/ssl.h | 62 | .In openssl/ssl.h |
@@ -61,6 +64,8 @@ | |||
61 | .Fn SSL_set_connect_state "SSL *ssl" | 64 | .Fn SSL_set_connect_state "SSL *ssl" |
62 | .Ft void | 65 | .Ft void |
63 | .Fn SSL_set_accept_state "SSL *ssl" | 66 | .Fn SSL_set_accept_state "SSL *ssl" |
67 | .Ft int | ||
68 | .Fn SSL_is_server "const SSL *ssl" | ||
64 | .Sh DESCRIPTION | 69 | .Sh DESCRIPTION |
65 | .Fn SSL_set_connect_state | 70 | .Fn SSL_set_connect_state |
66 | sets | 71 | sets |
@@ -72,6 +77,11 @@ sets | |||
72 | .Fa ssl | 77 | .Fa ssl |
73 | to work in server mode. | 78 | to work in server mode. |
74 | .Pp | 79 | .Pp |
80 | .Fn SSL_is_server | ||
81 | checks whether | ||
82 | .Fa ssl | ||
83 | is set to server mode. | ||
84 | .Pp | ||
75 | When the | 85 | When the |
76 | .Vt SSL_CTX | 86 | .Vt SSL_CTX |
77 | object was created with | 87 | object was created with |
@@ -101,11 +111,26 @@ the handshake routines must be explicitly set in advance using either | |||
101 | .Fn SSL_set_connect_state | 111 | .Fn SSL_set_connect_state |
102 | or | 112 | or |
103 | .Fn SSL_set_accept_state . | 113 | .Fn SSL_set_accept_state . |
104 | .Sh RETURN VALUES | 114 | .Pp |
115 | If | ||
116 | .Fn SSL_is_server | ||
117 | is called before | ||
105 | .Fn SSL_set_connect_state | 118 | .Fn SSL_set_connect_state |
106 | and | 119 | or |
107 | .Fn SSL_set_accept_state | 120 | .Fn SSL_set_accept_state |
108 | do not return diagnostic information. | 121 | was called either automatically or explicitly, |
122 | the result depends on what method was used when the | ||
123 | .Fa SSL_CTX | ||
124 | was created. | ||
125 | If a generic method or a dedicated server method was passed to | ||
126 | .Xr SSL_CTX_new 3 , | ||
127 | .Fn SSL_is_server | ||
128 | returns 1; otherwise, it returns 0. | ||
129 | .Sh RETURN VALUES | ||
130 | .Fn SSL_is_server | ||
131 | returns 1 if | ||
132 | .Fa ssl | ||
133 | is set to server mode or 0 if it is set to client mode. | ||
109 | .Sh SEE ALSO | 134 | .Sh SEE ALSO |
110 | .Xr ssl 3 , | 135 | .Xr ssl 3 , |
111 | .Xr SSL_accept 3 , | 136 | .Xr SSL_accept 3 , |