xref: /freebsd/crypto/openssl/doc/man3/SSL_get_peer_tmp_key.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1c9cf7b5cSJung-uk Kim=pod
2c9cf7b5cSJung-uk Kim
3c9cf7b5cSJung-uk Kim=head1 NAME
4c9cf7b5cSJung-uk Kim
5c9cf7b5cSJung-uk KimSSL_get_peer_tmp_key, SSL_get_server_tmp_key, SSL_get_tmp_key - get information
6c9cf7b5cSJung-uk Kimabout temporary keys used during a handshake
7c9cf7b5cSJung-uk Kim
8c9cf7b5cSJung-uk Kim=head1 SYNOPSIS
9c9cf7b5cSJung-uk Kim
10c9cf7b5cSJung-uk Kim #include <openssl/ssl.h>
11c9cf7b5cSJung-uk Kim
12c9cf7b5cSJung-uk Kim long SSL_get_peer_tmp_key(SSL *ssl, EVP_PKEY **key);
13c9cf7b5cSJung-uk Kim long SSL_get_server_tmp_key(SSL *ssl, EVP_PKEY **key);
14c9cf7b5cSJung-uk Kim long SSL_get_tmp_key(SSL *ssl, EVP_PKEY **key);
15c9cf7b5cSJung-uk Kim
16c9cf7b5cSJung-uk Kim=head1 DESCRIPTION
17c9cf7b5cSJung-uk Kim
18c9cf7b5cSJung-uk KimSSL_get_peer_tmp_key() returns the temporary key provided by the peer and
19c9cf7b5cSJung-uk Kimused during key exchange. For example, if ECDHE is in use, then this represents
20c9cf7b5cSJung-uk Kimthe peer's public ECDHE key. On success a pointer to the key is stored in
21c9cf7b5cSJung-uk KimB<*key>. It is the caller's responsibility to free this key after use using
22c9cf7b5cSJung-uk KimL<EVP_PKEY_free(3)>.
23c9cf7b5cSJung-uk Kim
24c9cf7b5cSJung-uk KimSSL_get_server_tmp_key() is a backwards compatibility alias for
25c9cf7b5cSJung-uk KimSSL_get_peer_tmp_key().
26c9cf7b5cSJung-uk KimUnder that name it worked just on the client side of the connection, its
27c9cf7b5cSJung-uk Kimbehaviour on the server end is release-dependent.
28c9cf7b5cSJung-uk Kim
29c9cf7b5cSJung-uk KimSSL_get_tmp_key() returns the equivalent information for the local
30c9cf7b5cSJung-uk Kimend of the connection.
31c9cf7b5cSJung-uk Kim
32c9cf7b5cSJung-uk Kim=head1 RETURN VALUES
33c9cf7b5cSJung-uk Kim
34c9cf7b5cSJung-uk KimAll these functions return 1 on success and 0 otherwise.
35c9cf7b5cSJung-uk Kim
36c9cf7b5cSJung-uk Kim=head1 NOTES
37c9cf7b5cSJung-uk Kim
38c9cf7b5cSJung-uk KimThis function is implemented as a macro.
39c9cf7b5cSJung-uk Kim
40c9cf7b5cSJung-uk Kim=head1 SEE ALSO
41c9cf7b5cSJung-uk Kim
42c9cf7b5cSJung-uk KimL<ssl(7)>, L<EVP_PKEY_free(3)>
43c9cf7b5cSJung-uk Kim
44c9cf7b5cSJung-uk Kim=head1 COPYRIGHT
45c9cf7b5cSJung-uk Kim
46c9cf7b5cSJung-uk KimCopyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
47c9cf7b5cSJung-uk Kim
48*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
49c9cf7b5cSJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
50c9cf7b5cSJung-uk Kimin the file LICENSE in the source distribution or at
51c9cf7b5cSJung-uk KimL<https://www.openssl.org/source/license.html>.
52c9cf7b5cSJung-uk Kim
53c9cf7b5cSJung-uk Kim=cut
54