compatibility of get cipher list function and update cmake files

This commit is contained in:
Jacob Barthelmeh
2017-01-31 14:40:21 -07:00
parent 4370a01778
commit 2086394a35
5 changed files with 32 additions and 6 deletions

View File

@@ -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();