From aa4d426b4d3527d7e166df1a05058c9a4a0f6683 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Apr 2021 00:33:56 +0200 Subject: initial/final commit --- .../doc/ssl/SSL_CTX_set_psk_client_callback.pod | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 openssl-1.1.0h/doc/ssl/SSL_CTX_set_psk_client_callback.pod (limited to 'openssl-1.1.0h/doc/ssl/SSL_CTX_set_psk_client_callback.pod') diff --git a/openssl-1.1.0h/doc/ssl/SSL_CTX_set_psk_client_callback.pod b/openssl-1.1.0h/doc/ssl/SSL_CTX_set_psk_client_callback.pod new file mode 100644 index 0000000..a417508 --- /dev/null +++ b/openssl-1.1.0h/doc/ssl/SSL_CTX_set_psk_client_callback.pod @@ -0,0 +1,63 @@ +=pod + +=head1 NAME + +SSL_CTX_set_psk_client_callback, SSL_set_psk_client_callback - set PSK client callback + +=head1 SYNOPSIS + + #include + + void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, + unsigned int (*callback)(SSL *ssl, const char *hint, + char *identity, unsigned int max_identity_len, + unsigned char *psk, unsigned int max_psk_len)); + void SSL_set_psk_client_callback(SSL *ssl, + unsigned int (*callback)(SSL *ssl, const char *hint, + char *identity, unsigned int max_identity_len, + unsigned char *psk, unsigned int max_psk_len)); + + +=head1 DESCRIPTION + +A client application must provide a callback function which is called +when the client is sending the ClientKeyExchange message to the server. + +The purpose of the callback function is to select the PSK identity and +the pre-shared key to use during the connection setup phase. + +The callback is set using functions SSL_CTX_set_psk_client_callback() +or SSL_set_psk_client_callback(). The callback function is given the +connection in parameter B, a B-terminated PSK identity hint +sent by the server in parameter B, a buffer B of +length B bytes where the resulting +B-terminated identity is to be stored, and a buffer B of +length B bytes where the resulting pre-shared key is to +be stored. + +=head1 NOTES + +Note that parameter B given to the callback may be B. + +=head1 RETURN VALUES + +Return values from the client callback are interpreted as follows: + +On success (callback found a PSK identity and a pre-shared key to use) +the length (> 0) of B in bytes is returned. + +Otherwise or on errors callback should return 0. In this case +the connection setup fails. + +=head1 COPYRIGHT + +Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. + +Copyright 2005 Nokia. + +=cut -- cgit v1.2.3