Fix to return the internal cipher suite name instead of NULL if NO_ERROR_STRINGS is defined. Fix for stray "if" in wolfSSL_SESSION_CIPHER_get_name.

This commit is contained in:
David Garske
2019-01-08 14:03:49 -08:00
parent 0ef4856039
commit ebd68e6afd

View File

@@ -16060,7 +16060,7 @@ const char* wolfSSL_CIPHER_get_name(const WOLFSSL_CIPHER* cipher)
return NULL;
}
#ifndef WOLFSSL_CIPHER_INTERNALNAME
#if !defined(WOLFSSL_CIPHER_INTERNALNAME) && !defined(NO_ERROR_STRINGS)
return wolfSSL_get_cipher_name_iana(cipher->ssl);
#else
return wolfSSL_get_cipher_name_internal(cipher->ssl);
@@ -16074,10 +16074,10 @@ const char* wolfSSL_SESSION_CIPHER_get_name(WOLFSSL_SESSION* session)
}
#ifdef SESSION_CERTS
#ifndef WOLFSSL_CIPHER_INTERNALNAME
return GetCipherNameIana(session->cipherSuite0, session->cipherSuite);
#if !defined(WOLFSSL_CIPHER_INTERNALNAME) && !defined(NO_ERROR_STRINGS)
return GetCipherNameIana(session->cipherSuite0, session->cipherSuite);
#else
if return GetCipherNameInternal(ession->cipherSuite0, session->cipherSuite);
return GetCipherNameInternal(ession->cipherSuite0, session->cipherSuite);
#endif
#else
return NULL;