mbed TLS upgraded to 2.6.0
Fork of mbedtls by
Diff: library/ssl_ciphersuites.c
- Revision:
- 2:bbdeda018a3c
- Parent:
- 0:cdf462088d13
--- a/library/ssl_ciphersuites.c Fri Sep 29 18:41:59 2017 +0100 +++ b/library/ssl_ciphersuites.c Fri Sep 29 19:50:30 2017 +0100 @@ -1817,6 +1817,24 @@ return( MBEDTLS_PK_NONE ); } } + +mbedtls_pk_type_t mbedtls_ssl_get_ciphersuite_sig_alg( const mbedtls_ssl_ciphersuite_t *info ) +{ + switch( info->key_exchange ) + { + case MBEDTLS_KEY_EXCHANGE_RSA: + case MBEDTLS_KEY_EXCHANGE_DHE_RSA: + case MBEDTLS_KEY_EXCHANGE_ECDHE_RSA: + return( MBEDTLS_PK_RSA ); + + case MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA: + return( MBEDTLS_PK_ECDSA ); + + default: + return( MBEDTLS_PK_NONE ); + } +} + #endif /* MBEDTLS_PK_C */ #if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C)