mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 00:55:39 +01:00
Fix bug in ssl_get_verify_result()
This commit is contained in:
parent
cc334eff3e
commit
e89163c0a8
@ -50,6 +50,8 @@ Bugfix
|
|||||||
* Fix unchecked return code in x509_crt_parse_path() on Windows (found by
|
* Fix unchecked return code in x509_crt_parse_path() on Windows (found by
|
||||||
Peter Vaskovic).
|
Peter Vaskovic).
|
||||||
* Fix assembly selection for MIPS64 (thanks to James Cowgill).
|
* Fix assembly selection for MIPS64 (thanks to James Cowgill).
|
||||||
|
* ssl_get_verify_result() now works even if the handshake was aborted due
|
||||||
|
to a failed verification (found by Fredrik Axelsson).
|
||||||
|
|
||||||
Changes
|
Changes
|
||||||
* Use deterministic nonces for AEAD ciphers in TLS by default (possible to
|
* Use deterministic nonces for AEAD ciphers in TLS by default (possible to
|
||||||
|
@ -1710,11 +1710,11 @@ size_t ssl_get_bytes_avail( const ssl_context *ssl );
|
|||||||
*
|
*
|
||||||
* \param ssl SSL context
|
* \param ssl SSL context
|
||||||
*
|
*
|
||||||
* \return 0 if successful, or a combination of:
|
* \return 0 if successful,
|
||||||
* BADCERT_EXPIRED
|
* -1 if result is not available (eg because the handshake was
|
||||||
* BADCERT_REVOKED
|
* aborted too early), or
|
||||||
* BADCERT_CN_MISMATCH
|
* a combination of BADCERT_xxx and BADCRL_xxx flags, see
|
||||||
* BADCERT_NOT_TRUSTED
|
* x509.h
|
||||||
*/
|
*/
|
||||||
int ssl_get_verify_result( const ssl_context *ssl );
|
int ssl_get_verify_result( const ssl_context *ssl );
|
||||||
|
|
||||||
|
@ -4336,7 +4336,13 @@ size_t ssl_get_bytes_avail( const ssl_context *ssl )
|
|||||||
|
|
||||||
int ssl_get_verify_result( const ssl_context *ssl )
|
int ssl_get_verify_result( const ssl_context *ssl )
|
||||||
{
|
{
|
||||||
return( ssl->session->verify_result );
|
if( ssl->session != NULL )
|
||||||
|
return( ssl->session->verify_result );
|
||||||
|
|
||||||
|
if( ssl->session_negotiate != NULL )
|
||||||
|
return( ssl->session_negotiate->verify_result );
|
||||||
|
|
||||||
|
return( -1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *ssl_get_ciphersuite( const ssl_context *ssl )
|
const char *ssl_get_ciphersuite( const ssl_context *ssl )
|
||||||
|
Loading…
Reference in New Issue
Block a user