Skip to content

Commit

Permalink
Merge pull request #6886 from julek-wolfssl/openvpn-master-fix
Browse files Browse the repository at this point in the history
Define SSL_get_peer_tmp_key
  • Loading branch information
JacobBarthelmeh authored Oct 18, 2023
2 parents 22ab217 + f99c7cb commit a3bf7a6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -17239,7 +17239,7 @@ size_t wolfSSL_get_server_random(const WOLFSSL *ssl, unsigned char *out,
* NOTE: currently wolfSSL_KeepHandshakeResources(WOLFSSL* ssl) must be called
* before the ephemeral key is stored.
* return WOLFSSL_SUCCESS on success */
int wolfSSL_get_server_tmp_key(const WOLFSSL* ssl, WOLFSSL_EVP_PKEY** pkey)
int wolfSSL_get_peer_tmp_key(const WOLFSSL* ssl, WOLFSSL_EVP_PKEY** pkey)
{
WOLFSSL_EVP_PKEY* ret = NULL;

Expand Down
3 changes: 2 additions & 1 deletion wolfssl/openssl/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,8 @@ typedef WOLFSSL_SRTP_PROTECTION_PROFILE SRTP_PROTECTION_PROFILE;
#define SSL_CTX_set_tlsext_max_fragment_length \
wolfSSL_CTX_set_tlsext_max_fragment_length
#define SSL_get_server_random wolfSSL_get_server_random
#define SSL_get_server_tmp_key wolfSSL_get_server_tmp_key
#define SSL_get_server_tmp_key wolfSSL_get_peer_tmp_key
#define SSL_get_peer_tmp_key wolfSSL_get_peer_tmp_key

#define SSL_CTX_set_min_proto_version wolfSSL_CTX_set_min_proto_version
#define SSL_CTX_set_max_proto_version wolfSSL_CTX_set_max_proto_version
Expand Down
4 changes: 3 additions & 1 deletion wolfssl/ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -4397,7 +4397,9 @@ WOLFSSL_API size_t wolfSSL_BIO_wpending(const WOLFSSL_BIO *bio);
WOLFSSL_API int wolfSSL_BIO_supports_pending(const WOLFSSL_BIO *bio);
WOLFSSL_API size_t wolfSSL_BIO_ctrl_pending(WOLFSSL_BIO *b);

WOLFSSL_API int wolfSSL_get_server_tmp_key(const WOLFSSL* ssl, WOLFSSL_EVP_PKEY** pkey);
/* Definition for backwards comaptiblity */
#define wolfSSL_get_server_tmp_key wolfSSL_get_peer_tmp_key
WOLFSSL_API int wolfSSL_get_peer_tmp_key(const WOLFSSL* ssl, WOLFSSL_EVP_PKEY** pkey);

WOLFSSL_API int wolfSSL_CTX_set_min_proto_version(WOLFSSL_CTX* ctx, int version);
WOLFSSL_API int wolfSSL_CTX_set_max_proto_version(WOLFSSL_CTX* ctx, int version);
Expand Down

0 comments on commit a3bf7a6

Please sign in to comment.