forked from wolfSSL/wolfssl
Add function wolfSSL_get_cipher_name_iana_from_suite() a wrapper around
internal API GetCipherNameIana().
This commit is contained in:
@ -19221,6 +19221,12 @@ const char* wolfSSL_get_cipher_name_from_suite(const byte cipherSuite0,
|
||||
return GetCipherNameInternal(cipherSuite0, cipherSuite);
|
||||
}
|
||||
|
||||
const char* wolfSSL_get_cipher_name_iana_from_suite(const byte cipherSuite0,
|
||||
const byte cipherSuite)
|
||||
{
|
||||
return GetCipherNameIana(cipherSuite0, cipherSuite);
|
||||
}
|
||||
|
||||
word32 wolfSSL_CIPHER_get_id(const WOLFSSL_CIPHER* cipher)
|
||||
{
|
||||
word16 cipher_id = 0;
|
||||
|
@ -2574,11 +2574,16 @@ static void test_client_nofail(void* args, void *cb)
|
||||
|
||||
/* IANA Cipher Suites Names */
|
||||
/* Unless WOLFSSL_CIPHER_INTERNALNAME or NO_ERROR_STRINGS,
|
||||
then its the internal cipher suite name */
|
||||
then it's the internal cipher suite name */
|
||||
cipher = wolfSSL_get_current_cipher(ssl);
|
||||
cipherName1 = wolfSSL_CIPHER_get_name(cipher);
|
||||
cipherName2 = wolfSSL_get_cipher(ssl);
|
||||
AssertStrEQ(cipherName1, cipherName2);
|
||||
#if !defined(WOLFSSL_CIPHER_INTERNALNAME) && !defined(NO_ERROR_STRINGS)
|
||||
cipherName1 = wolfSSL_get_cipher_name_iana_from_suite(
|
||||
(cipherSuite >> 8), cipherSuite & 0xFF);
|
||||
AssertStrEQ(cipherName1, cipherName2);
|
||||
#endif
|
||||
|
||||
if (cb != NULL)
|
||||
((cbType)cb)(ctx, ssl);
|
||||
|
@ -815,6 +815,8 @@ WOLFSSL_API int wolfSSL_get_ciphers_iana(char*, int);
|
||||
WOLFSSL_API const char* wolfSSL_get_cipher_name(WOLFSSL* ssl);
|
||||
WOLFSSL_API const char* wolfSSL_get_cipher_name_from_suite(const unsigned char,
|
||||
const unsigned char);
|
||||
WOLFSSL_API const char* wolfSSL_get_cipher_name_iana_from_suite(
|
||||
const unsigned char, const unsigned char);
|
||||
WOLFSSL_API const char* wolfSSL_get_shared_ciphers(WOLFSSL* ssl, char* buf,
|
||||
int len);
|
||||
WOLFSSL_API const char* wolfSSL_get_curve_name(WOLFSSL* ssl);
|
||||
|
Reference in New Issue
Block a user