openssl wrapper: introduce SSL_get0_param

This adds the standard OpenSSL api to get a pointer to the SSL struct's
X509_VERIFY_PARAM.  We need this for the OpenSSL api to set the peer
hostname introduced in the next patch.

Part of https://github.com/espressif/esp-idf/pull/980
This commit is contained in:
Andy Green 2017-09-10 08:00:27 +08:00 committed by Angus Gratton
parent 7e8c2a9c00
commit 0f02a38262
2 changed files with 18 additions and 0 deletions

View file

@ -1523,6 +1523,15 @@ long SSL_get_timeout(const SSL *ssl);
*/
int SSL_get_verify_mode(const SSL *ssl);
/**
* @brief get SSL verify parameters
*
* @param ssl - SSL point
*
* @return verify parameters
*/
X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl);
/**
* @brief get SSL write only IO handle
*

View file

@ -117,6 +117,15 @@ failed1:
return NULL;
}
/**
* @brief return SSL X509 verify parameters
*/
X509_VERIFY_PARAM *SSL_get0_param(SSL *ssl)
{
return &ssl->param;
}
/**
* @brief set SSL context client CA certification
*/