mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 03:55:39 +01:00
- Added function for stringified SSL/TLS version
This commit is contained in:
parent
1f87fb6896
commit
43ca69c38a
@ -4,10 +4,8 @@ PolarSSL ChangeLog
|
||||
Features
|
||||
Note: Most of these features have been donated by Fox-IT
|
||||
* Added Doxygen source code documentation parts
|
||||
* Added generic message digest wrapper for integration
|
||||
with OpenVPN
|
||||
* Added generic cipher wrapper for integration
|
||||
with OpenVPN
|
||||
* Added generic message digest and cipher wrapper
|
||||
for integration with OpenVPN
|
||||
* Added reading of DHM context from memory and file
|
||||
* Added verification callback on certificate chain
|
||||
verification to allow external blacklisting.
|
||||
|
@ -525,6 +525,15 @@ int ssl_get_verify_result( const ssl_context *ssl );
|
||||
*/
|
||||
const char *ssl_get_cipher( const ssl_context *ssl );
|
||||
|
||||
/**
|
||||
* \brief Return the current SSL version (SSLv3/TLSv1/etc)
|
||||
*
|
||||
* \param ssl SSL context
|
||||
*
|
||||
* \return a string containing the SSL version
|
||||
*/
|
||||
const char *ssl_get_version( const ssl_context *ssl );
|
||||
|
||||
/**
|
||||
* \brief Perform the SSL handshake
|
||||
*
|
||||
|
@ -1918,6 +1918,25 @@ const char *ssl_get_cipher( const ssl_context *ssl )
|
||||
return( "unknown" );
|
||||
}
|
||||
|
||||
const char *ssl_get_version( const ssl_context *ssl )
|
||||
{
|
||||
switch( ssl->minor_ver )
|
||||
{
|
||||
case SSL_MINOR_VERSION_0:
|
||||
return( "SSLv3.0" );
|
||||
|
||||
case SSL_MINOR_VERSION_1:
|
||||
return( "TLSv1.0" );
|
||||
|
||||
case SSL_MINOR_VERSION_2:
|
||||
return( "TLSv1.1" );
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return( "unknown" );
|
||||
}
|
||||
|
||||
int ssl_default_ciphers[] =
|
||||
{
|
||||
#if defined(POLARSSL_DHM_C)
|
||||
|
Loading…
Reference in New Issue
Block a user