@@ -1793,13 +1793,37 @@ MODRET set_proxytlsciphersuite(cmd_rec *cmd) {
17931793 if (cmd -> argc - 1 == 1 ) {
17941794 ciphersuite = cmd -> argv [1 ];
17951795
1796+ /* Currently, OpenSSL ciphersuite names for TLSv1.3 all use underscores;
1797+ * ciphersuite names for TLSv1.2 and older do NOT use underscores.
1798+ *
1799+ * So if we see an underscore in the configured ciphersuites here, we
1800+ * know that the optional protocol parameter has NOT been used, and that
1801+ * a TLSv1.3 ciphersuite is being configured -- and that this situation
1802+ * will be silently ignored by OpenSSL.
1803+ */
1804+ if (strchr (ciphersuite , '_' ) != NULL ) {
1805+ CONF_ERROR (cmd , pstrcat (cmd -> tmp_pool ,
1806+ "use of TLSv1.3 ciphersuite in '" , ciphersuite ,
1807+ "' requires protocol parameter; use 'ProxyTLSCipherSuite TLSv1.3 " ,
1808+ ciphersuite , "'" , NULL ));
1809+ }
1810+
17961811 } else if (cmd -> argc - 1 == 2 ) {
17971812 char * protocol_text ;
17981813
17991814 protocol_text = cmd -> argv [1 ];
18001815 if (strcasecmp (protocol_text , "TLSv1.3" ) == 0 ) {
18011816 protocol = PROXY_TLS_PROTO_TLS_V1_3 ;
18021817
1818+ } else if (strcasecmp (protocol_text , "TLSv1.2" ) == 0 ) {
1819+ protocol = PROXY_TLS_PROTO_TLS_V1_2 ;
1820+
1821+ } else if (strcasecmp (protocol_text , "TLSv1.1" ) == 0 ) {
1822+ protocol = PROXY_TLS_PROTO_TLS_V1_1 ;
1823+
1824+ } else if (strcasecmp (protocol_text , "TLSv1.0" ) == 0 ) {
1825+ protocol = PROXY_TLS_PROTO_TLS_V1 ;
1826+
18031827 } else {
18041828 CONF_ERROR (cmd , pstrcat (cmd -> tmp_pool ,
18051829 "unknown/unsupported protocol specifier: " , protocol_text , NULL ));
0 commit comments