1*7a73e666Sschwarze.\" $OpenBSD: SSL_get_server_tmp_key.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $ 2bcc3138aSschwarze.\" OpenSSL SSL_get_server_tmp_key.pod 508fafd8 Apr 3 15:41:21 2017 +0100 3bcc3138aSschwarze.\" 4bcc3138aSschwarze.\" This file was written by Matt Caswell <matt@openssl.org> 5bcc3138aSschwarze.\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. 6bcc3138aSschwarze.\" 7bcc3138aSschwarze.\" Redistribution and use in source and binary forms, with or without 8bcc3138aSschwarze.\" modification, are permitted provided that the following conditions 9bcc3138aSschwarze.\" are met: 10bcc3138aSschwarze.\" 11bcc3138aSschwarze.\" 1. Redistributions of source code must retain the above copyright 12bcc3138aSschwarze.\" notice, this list of conditions and the following disclaimer. 13bcc3138aSschwarze.\" 14bcc3138aSschwarze.\" 2. Redistributions in binary form must reproduce the above copyright 15bcc3138aSschwarze.\" notice, this list of conditions and the following disclaimer in 16bcc3138aSschwarze.\" the documentation and/or other materials provided with the 17bcc3138aSschwarze.\" distribution. 18bcc3138aSschwarze.\" 19bcc3138aSschwarze.\" 3. All advertising materials mentioning features or use of this 20bcc3138aSschwarze.\" software must display the following acknowledgment: 21bcc3138aSschwarze.\" "This product includes software developed by the OpenSSL Project 22bcc3138aSschwarze.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 23bcc3138aSschwarze.\" 24bcc3138aSschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 25bcc3138aSschwarze.\" endorse or promote products derived from this software without 26bcc3138aSschwarze.\" prior written permission. For written permission, please contact 27bcc3138aSschwarze.\" openssl-core@openssl.org. 28bcc3138aSschwarze.\" 29bcc3138aSschwarze.\" 5. Products derived from this software may not be called "OpenSSL" 30bcc3138aSschwarze.\" nor may "OpenSSL" appear in their names without prior written 31bcc3138aSschwarze.\" permission of the OpenSSL Project. 32bcc3138aSschwarze.\" 33bcc3138aSschwarze.\" 6. Redistributions of any form whatsoever must retain the following 34bcc3138aSschwarze.\" acknowledgment: 35bcc3138aSschwarze.\" "This product includes software developed by the OpenSSL Project 36bcc3138aSschwarze.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" 37bcc3138aSschwarze.\" 38bcc3138aSschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 39bcc3138aSschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 40bcc3138aSschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 41bcc3138aSschwarze.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 42bcc3138aSschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43bcc3138aSschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 44bcc3138aSschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 45bcc3138aSschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 46bcc3138aSschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 47bcc3138aSschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 48bcc3138aSschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49bcc3138aSschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50bcc3138aSschwarze.\" 51*7a73e666Sschwarze.Dd $Mdocdate: June 12 2019 $ 52bcc3138aSschwarze.Dt SSL_GET_SERVER_TMP_KEY 3 53bcc3138aSschwarze.Os 54bcc3138aSschwarze.Sh NAME 55bcc3138aSschwarze.Nm SSL_get_server_tmp_key 56bcc3138aSschwarze.Nd temporary server key during a handshake 57bcc3138aSschwarze.Sh SYNOPSIS 58bcc3138aSschwarze.In openssl/ssl.h 59bcc3138aSschwarze.Ft long 60bcc3138aSschwarze.Fo SSL_get_server_tmp_key 61bcc3138aSschwarze.Fa "SSL *ssl" 62bcc3138aSschwarze.Fa "EVP_PKEY **key" 63bcc3138aSschwarze.Fc 64bcc3138aSschwarze.Sh DESCRIPTION 65bcc3138aSschwarze.Fn SSL_get_server_tmp_key 66bcc3138aSschwarzeretrieves the temporary key provided by the server 67bcc3138aSschwarzeand used during key exchange. 68bcc3138aSschwarzeFor example, if ECDHE is in use, 69bcc3138aSschwarzethis represents the server's public ECDHE key. 70bcc3138aSschwarze.Pp 71bcc3138aSschwarzeIn case of success, a copy of the key is stored in 72bcc3138aSschwarze.Pf * Fa key . 73bcc3138aSschwarzeIt is the caller's responsibility to free this key after use using 74bcc3138aSschwarze.Xr EVP_PKEY_free 3 . 75bcc3138aSschwarze.Pp 76bcc3138aSschwarzeThis function may only be called by the client. 77bcc3138aSschwarze.Pp 78bcc3138aSschwarzeThis function is implemented as a macro. 79bcc3138aSschwarze.Sh RETURN VALUES 80bcc3138aSschwarze.Fn SSL_get_server_tmp_key 81bcc3138aSschwarzereturns 1 on success or 0 on failure. 82bcc3138aSschwarze.Sh SEE ALSO 83bcc3138aSschwarze.Xr EVP_PKEY_free 3 , 84*7a73e666Sschwarze.Xr ssl 3 , 85bcc3138aSschwarze.Xr SSL_ctrl 3 86a8f3fffcSschwarze.Sh HISTORY 87a8f3fffcSschwarze.Fn SSL_get_server_tmp_key 8820b9f7f9Sschwarzefirst appeared in OpenSSL 1.0.2 and has been available since 89a8f3fffcSschwarze.Ox 6.1 . 90