mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-02-04 04:25:05 +01:00
compatibility of get cipher list function and update cmake files
This commit is contained in:
27
src/ssl.c
27
src/ssl.c
@@ -634,6 +634,33 @@ char* wolfSSL_get_cipher_list(int priority)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the name of cipher at priority level passed in.
|
||||
*/
|
||||
char* wolfSSL_get_cipher_list_ex(WOLFSSL* ssl, int priority)
|
||||
{
|
||||
|
||||
if (ssl == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
const char* cipher;
|
||||
|
||||
if ((cipher = wolfSSL_get_cipher_name_internal(ssl)) != NULL) {
|
||||
if (priority == 0) {
|
||||
return (char*)cipher;
|
||||
}
|
||||
else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return wolfSSL_get_cipher_list(priority);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int wolfSSL_get_ciphers(char* buf, int len)
|
||||
{
|
||||
const char* const* ciphers = GetCipherNames();
|
||||
|
||||
Reference in New Issue
Block a user