diff options
| author | bentley <> | 2014-10-12 09:33:04 +0000 |
|---|---|---|
| committer | bentley <> | 2014-10-12 09:33:04 +0000 |
| commit | 78332233d01faa45e0bb0b1583d47cb5ad1ddc19 (patch) | |
| tree | a5087bf8d016a6041c2b6822fbecfd8f6c5e70b1 /src/lib/libssl/doc/SSL_set_shutdown.3 | |
| parent | 4e737c824fafe5f105e5f4849a9db2569b5d53d8 (diff) | |
| download | openbsd-78332233d01faa45e0bb0b1583d47cb5ad1ddc19.tar.gz openbsd-78332233d01faa45e0bb0b1583d47cb5ad1ddc19.tar.bz2 openbsd-78332233d01faa45e0bb0b1583d47cb5ad1ddc19.zip | |
Convert libssl manpages from pod to mdoc(7).
libcrypto has not been started yet.
ok schwarze@ miod@
Diffstat (limited to 'src/lib/libssl/doc/SSL_set_shutdown.3')
| -rw-r--r-- | src/lib/libssl/doc/SSL_set_shutdown.3 | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_set_shutdown.3 b/src/lib/libssl/doc/SSL_set_shutdown.3 new file mode 100644 index 0000000000..239bbd6801 --- /dev/null +++ b/src/lib/libssl/doc/SSL_set_shutdown.3 | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | .Dd $Mdocdate: October 12 2014 $ | ||
| 2 | .Dt SSL_SET_SHUTDOWN 3 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm SSL_set_shutdown , | ||
| 6 | .Nm SSL_get_shutdown | ||
| 7 | .Nd manipulate shutdown state of an SSL connection | ||
| 8 | .Sh SYNOPSIS | ||
| 9 | .In openssl/ssl.h | ||
| 10 | .Ft void | ||
| 11 | .Fn SSL_set_shutdown "SSL *ssl" "int mode" | ||
| 12 | .Ft int | ||
| 13 | .Fn SSL_get_shutdown "const SSL *ssl" | ||
| 14 | .Sh DESCRIPTION | ||
| 15 | .Fn SSL_set_shutdown | ||
| 16 | sets the shutdown state of | ||
| 17 | .Fa ssl | ||
| 18 | to | ||
| 19 | .Fa mode . | ||
| 20 | .Pp | ||
| 21 | .Fn SSL_get_shutdown | ||
| 22 | returns the shutdown mode of | ||
| 23 | .Fa ssl . | ||
| 24 | .Sh NOTES | ||
| 25 | The shutdown state of an ssl connection is a bitmask of: | ||
| 26 | .Bl -tag -width Ds | ||
| 27 | .It 0 | ||
| 28 | No shutdown setting, yet. | ||
| 29 | .It Dv SSL_SENT_SHUTDOWN | ||
| 30 | A | ||
| 31 | .Dq close notify | ||
| 32 | shutdown alert was sent to the peer; the connection is being considered closed | ||
| 33 | and the session is closed and correct. | ||
| 34 | .It Dv SSL_RECEIVED_SHUTDOWN | ||
| 35 | A shutdown alert was received form the peer, either a normal | ||
| 36 | .Dq close notify | ||
| 37 | or a fatal error. | ||
| 38 | .El | ||
| 39 | .Pp | ||
| 40 | .Dv SSL_SENT_SHUTDOWN | ||
| 41 | and | ||
| 42 | .Dv SSL_RECEIVED_SHUTDOWN | ||
| 43 | can be set at the same time. | ||
| 44 | .Pp | ||
| 45 | The shutdown state of the connection is used to determine the state of the | ||
| 46 | .Fa ssl | ||
| 47 | session. | ||
| 48 | If the session is still open when | ||
| 49 | .Xr SSL_clear 3 | ||
| 50 | or | ||
| 51 | .Xr SSL_free 3 | ||
| 52 | is called, it is considered bad and removed according to RFC2246. | ||
| 53 | The actual condition for a correctly closed session is | ||
| 54 | .Dv SSL_SENT_SHUTDOWN | ||
| 55 | (according to the TLS RFC, it is acceptable to only send the | ||
| 56 | .Dq close notify | ||
| 57 | alert but to not wait for the peer's answer when the underlying connection is | ||
| 58 | closed). | ||
| 59 | .Fn SSL_set_shutdown | ||
| 60 | can be used to set this state without sending a close alert to the peer (see | ||
| 61 | .Xr SSL_shutdown 3 ) . | ||
| 62 | .Pp | ||
| 63 | If a | ||
| 64 | .Dq close notify | ||
| 65 | was received, | ||
| 66 | .Dv SSL_RECEIVED_SHUTDOWN | ||
| 67 | will be set, but to set | ||
| 68 | .Dv SSL_SENT_SHUTDOWN | ||
| 69 | the application must still call | ||
| 70 | .Xr SSL_shutdown 3 | ||
| 71 | or | ||
| 72 | .Fn SSL_set_shutdown | ||
| 73 | itself. | ||
| 74 | .Sh RETURN VALUES | ||
| 75 | .Fn SSL_set_shutdown | ||
| 76 | does not return diagnostic information. | ||
| 77 | .Pp | ||
| 78 | .Fn SSL_get_shutdown | ||
| 79 | returns the current setting. | ||
| 80 | .Sh SEE ALSO | ||
| 81 | .Xr ssl 3 , | ||
| 82 | .Xr SSL_clear 3 , | ||
| 83 | .Xr SSL_CTX_set_quiet_shutdown 3 , | ||
| 84 | .Xr SSL_free 3 , | ||
| 85 | .Xr SSL_shutdown 3 | ||
