@@ -25948,7 +25948,7 @@ void SetErrorString(int error, char* str)
2594825948 */
2594925949
2595025950 #ifndef NO_ERROR_STRINGS
25951- #if defined(OPENSSL_ALL ) || defined(WOLFSSL_QT) || \
25951+ #if defined(OPENSSL_EXTRA ) || defined(WOLFSSL_QT) || \
2595225952 defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_NGINX)
2595325953 #define SUITE_INFO(x,y,z,w,v,u) {(x),(y),(z),(w),(v),(u),WOLFSSL_CIPHER_SUITE_FLAG_NONE}
2595425954 #define SUITE_ALIAS(x,z,w,v,u) {(x),"",(z),(w),(v),(u),WOLFSSL_CIPHER_SUITE_FLAG_NAMEALIAS},
@@ -25957,7 +25957,7 @@ void SetErrorString(int error, char* str)
2595725957 #define SUITE_ALIAS(x,z,w,v,u) {(x),"",(z),(w),WOLFSSL_CIPHER_SUITE_FLAG_NAMEALIAS},
2595825958 #endif
2595925959 #else
25960- #if defined(OPENSSL_ALL ) || defined(WOLFSSL_QT) || \
25960+ #if defined(OPENSSL_EXTRA ) || defined(WOLFSSL_QT) || \
2596125961 defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_NGINX)
2596225962 #define SUITE_INFO(x,y,z,w,v,u) {(x),(z),(w),(v),(u),WOLFSSL_CIPHER_SUITE_FLAG_NONE}
2596325963 #define SUITE_ALIAS(x,z,w,v,u) {(x),(z),(w),(v),(u),WOLFSSL_CIPHER_SUITE_FLAG_NAMEALIAS},
@@ -26819,13 +26819,16 @@ const char* wolfSSL_get_cipher_name_iana(WOLFSSL* ssl)
2681926819}
2682026820
2682126821int GetCipherSuiteFromName(const char* name, byte* cipherSuite0,
26822- byte* cipherSuite , int* flags)
26822+ byte* cipherSuite, byte* major, byte* minor , int* flags)
2682326823{
2682426824 int ret = WC_NO_ERR_TRACE(BAD_FUNC_ARG);
2682526825 int i;
2682626826 unsigned long len;
2682726827 const char* nameDelim;
2682826828
26829+ (void)major;
26830+ (void)minor;
26831+
2682926832 /* Support trailing : */
2683026833 nameDelim = XSTRSTR(name, ":");
2683126834 if (nameDelim)
@@ -26843,9 +26846,19 @@ int GetCipherSuiteFromName(const char* name, byte* cipherSuite0,
2684326846#endif
2684426847
2684526848 if (found) {
26846- *cipherSuite0 = cipher_names[i].cipherSuite0;
26847- *cipherSuite = cipher_names[i].cipherSuite;
26848- *flags = cipher_names[i].flags;
26849+ if (cipherSuite0 != NULL)
26850+ *cipherSuite0 = cipher_names[i].cipherSuite0;
26851+ if (cipherSuite != NULL)
26852+ *cipherSuite = cipher_names[i].cipherSuite;
26853+ #if defined(OPENSSL_EXTRA) || defined(WOLFSSL_QT) || \
26854+ defined(WOLFSSL_HAPROXY) || defined(WOLFSSL_NGINX)
26855+ if (major != NULL)
26856+ *major = cipher_names[i].major;
26857+ if (minor != NULL)
26858+ *minor = cipher_names[i].minor;
26859+ #endif
26860+ if (flags != NULL)
26861+ *flags = cipher_names[i].flags;
2684926862 ret = 0;
2685026863 break;
2685126864 }
0 commit comments