diff options
author | Nathan Hoad <nathan@getoffmalawn.com> | 2015-03-07 19:52:11 +1100 |
---|---|---|
committer | Nathan Hoad <nathan@getoffmalawn.com> | 2015-03-07 19:52:11 +1100 |
commit | 6a548a5c920533fabb9f71327e814752faef29a5 (patch) | |
tree | 4f84d9c84d4f6ce89fd0ce61231adfe88ccc8ea3 | |
parent | 5978625c12c705a23ea4d2975162f55b160074ea (diff) | |
download | Nim-6a548a5c920533fabb9f71327e814752faef29a5.tar.gz |
Add some documentation to the server-side callback functions.
-rw-r--r-- | lib/wrappers/openssl.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index dfc08a2bd..791c8d351 100644 --- a/lib/wrappers/openssl.nim +++ b/lib/wrappers/openssl.nim @@ -319,9 +319,12 @@ proc SSL_set_tlsext_host_name*(ssl: SslPtr, name: cstring): int = proc SSL_get_servername*(ssl: SslPtr, typ: cInt = TLSEXT_NAMETYPE_host_name): cstring {.cdecl, dynlib: DLLSSLName, importc.} proc SSL_CTX_set_tlsext_servername_callback*(ctx: SslCtx, cb: PFunction): int = + ## Set the callback to be used on listening SSL connections when the client hello is received. + ## Callback proc ``cb`` should be of the form `proc (ssl: SslPtr, cb_id: int, arg: pointer): int` result = SSL_CTX_callback_ctrl(ctx, SSL_CTRL_SET_TLSEXT_SERVERNAME_CB, cb) proc SSL_CTX_set_tlsext_servername_arg*(ctx: SslCtx, arg: pointer): int = + ## Set the pointer to be used in the callback registered to ``SSL_CTX_set_tlsext_servername_callback``. result = SSL_CTX_ctrl(ctx, SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG, 0, arg) |