diff options
author | schwarze <> | 2016-11-05 15:32:20 +0000 |
---|---|---|
committer | schwarze <> | 2016-11-05 15:32:20 +0000 |
commit | 5af30545c000c195ca6e44f207da004e5780ddb5 (patch) | |
tree | 1672f1234352c29443fcacb44e22f1b20f174d99 /src/lib/libssl/doc/SSL_CTX_set_msg_callback.3 | |
parent | ba7c6bac5d2c870a4d1c1ce9f08db5e57c660625 (diff) | |
download | openbsd-5af30545c000c195ca6e44f207da004e5780ddb5.tar.gz openbsd-5af30545c000c195ca6e44f207da004e5780ddb5.tar.bz2 openbsd-5af30545c000c195ca6e44f207da004e5780ddb5.zip |
move manual pages from doc/ to man/ for consistency with other
libraries, in particular considering that there are unrelated
files in doc/; requested by jsing@ and beck@
Diffstat (limited to 'src/lib/libssl/doc/SSL_CTX_set_msg_callback.3')
-rw-r--r-- | src/lib/libssl/doc/SSL_CTX_set_msg_callback.3 | 135 |
1 files changed, 0 insertions, 135 deletions
diff --git a/src/lib/libssl/doc/SSL_CTX_set_msg_callback.3 b/src/lib/libssl/doc/SSL_CTX_set_msg_callback.3 deleted file mode 100644 index c72f37ccd9..0000000000 --- a/src/lib/libssl/doc/SSL_CTX_set_msg_callback.3 +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | .\" | ||
2 | .\" $OpenBSD: SSL_CTX_set_msg_callback.3,v 1.3 2015/11/11 22:14:40 jmc Exp $ | ||
3 | .\" | ||
4 | .Dd $Mdocdate: November 11 2015 $ | ||
5 | .Dt SSL_CTX_SET_MSG_CALLBACK 3 | ||
6 | .Os | ||
7 | .Sh NAME | ||
8 | .Nm SSL_CTX_set_msg_callback , | ||
9 | .Nm SSL_CTX_set_msg_callback_arg , | ||
10 | .Nm SSL_set_msg_callback , | ||
11 | .Nm SSL_set_msg_callback_arg | ||
12 | .Nd install callback for observing protocol messages | ||
13 | .Sh SYNOPSIS | ||
14 | .In openssl/ssl.h | ||
15 | .Ft void | ||
16 | .Fo SSL_CTX_set_msg_callback | ||
17 | .Fa "SSL_CTX *ctx" | ||
18 | .Fa "void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)" | ||
19 | .Fc | ||
20 | .Ft void | ||
21 | .Fn SSL_CTX_set_msg_callback_arg "SSL_CTX *ctx" "void *arg" | ||
22 | .Ft void | ||
23 | .Fo SSL_set_msg_callback | ||
24 | .Fa "SSL *ssl" | ||
25 | .Fa "void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)" | ||
26 | .Fc | ||
27 | .Ft void | ||
28 | .Fn SSL_set_msg_callback_arg "SSL *ssl" "void *arg" | ||
29 | .Sh DESCRIPTION | ||
30 | .Fn SSL_CTX_set_msg_callback | ||
31 | or | ||
32 | .Fn SSL_set_msg_callback | ||
33 | can be used to define a message callback function | ||
34 | .Fa cb | ||
35 | for observing all SSL/TLS protocol messages (such as handshake messages) | ||
36 | that are received or sent. | ||
37 | .Fn SSL_CTX_set_msg_callback_arg | ||
38 | and | ||
39 | .Fn SSL_set_msg_callback_arg | ||
40 | can be used to set argument | ||
41 | .Fa arg | ||
42 | to the callback function, which is available for arbitrary application use. | ||
43 | .Pp | ||
44 | .Fn SSL_CTX_set_msg_callback | ||
45 | and | ||
46 | .Fn SSL_CTX_set_msg_callback_arg | ||
47 | specify default settings that will be copied to new | ||
48 | .Vt SSL | ||
49 | objects by | ||
50 | .Xr SSL_new 3 . | ||
51 | .Fn SSL_set_msg_callback | ||
52 | and | ||
53 | .Fn SSL_set_msg_callback_arg | ||
54 | modify the actual settings of an | ||
55 | .Vt SSL | ||
56 | object. | ||
57 | Using a | ||
58 | .Dv NULL | ||
59 | pointer for | ||
60 | .Fa cb | ||
61 | disables the message callback. | ||
62 | .Pp | ||
63 | When | ||
64 | .Fa cb | ||
65 | is called by the SSL/TLS library for a protocol message, | ||
66 | the function arguments have the following meaning: | ||
67 | .Bl -tag -width Ds | ||
68 | .It Fa write_p | ||
69 | This flag is 0 when a protocol message has been received and 1 when a protocol | ||
70 | message has been sent. | ||
71 | .It Fa version | ||
72 | The protocol version according to which the protocol message is | ||
73 | interpreted by the library. | ||
74 | Currently, this is one of | ||
75 | .Dv SSL2_VERSION , | ||
76 | .Dv SSL3_VERSION | ||
77 | and | ||
78 | .Dv TLS1_VERSION | ||
79 | (for SSL 2.0, SSL 3.0 and TLS 1.0, respectively). | ||
80 | .It Fa content_type | ||
81 | In the case of SSL 2.0, this is always 0. | ||
82 | In the case of SSL 3.0 or TLS 1.0, this is one of the | ||
83 | .Em ContentType | ||
84 | values defined in the protocol specification | ||
85 | .Po | ||
86 | .Dq change_cipher_spec(20) , | ||
87 | .Dq alert(21) , | ||
88 | .Dq handshake(22) ; | ||
89 | but never | ||
90 | .Dq application_data(23) | ||
91 | because the callback will only be called for protocol messages. | ||
92 | .Pc | ||
93 | .It Fa buf , Fa len | ||
94 | .Fa buf | ||
95 | points to a buffer containing the protocol message, which consists of | ||
96 | .Fa len | ||
97 | bytes. | ||
98 | The buffer is no longer valid after the callback function has returned. | ||
99 | .It Fa ssl | ||
100 | The | ||
101 | .Vt SSL | ||
102 | object that received or sent the message. | ||
103 | .It Fa arg | ||
104 | The user-defined argument optionally defined by | ||
105 | .Fn SSL_CTX_set_msg_callback_arg | ||
106 | or | ||
107 | .Fn SSL_set_msg_callback_arg . | ||
108 | .El | ||
109 | .Sh NOTES | ||
110 | Protocol messages are passed to the callback function after decryption | ||
111 | and fragment collection where applicable. | ||
112 | (Thus record boundaries are not visible.) | ||
113 | .Pp | ||
114 | If processing a received protocol message results in an error, | ||
115 | the callback function may not be called. | ||
116 | For example, the callback function will never see messages that are considered | ||
117 | too large to be processed. | ||
118 | .Pp | ||
119 | Due to automatic protocol version negotiation, | ||
120 | .Fa version | ||
121 | is not necessarily the protocol version used by the sender of the message: | ||
122 | If a TLS 1.0 ClientHello message is received by an SSL 3.0-only server, | ||
123 | .Fa version | ||
124 | will be | ||
125 | .Dv SSL3_VERSION . | ||
126 | .Sh SEE ALSO | ||
127 | .Xr ssl 3 , | ||
128 | .Xr SSL_new 3 | ||
129 | .Sh HISTORY | ||
130 | .Fn SSL_CTX_set_msg_callback , | ||
131 | .Fn SSL_CTX_set_msg_callback_arg , | ||
132 | .Fn SSL_set_msg_callback | ||
133 | and | ||
134 | .Fn SSL_set_msg_callback_arg | ||
135 | were added in OpenSSL 0.9.7. | ||