summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2020-01-12 12:38:20 +0000
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2020-01-12 12:38:20 +0000
commit0b2ceb2e945be38e8e64bd6ed7cdddca1ed0ac0b (patch)
treef8feeaceb3a8f2978503fbc2298a8b172787e9c2
parente87834cb2524553085819b3c6e493bf3b608ab44 (diff)
parent6dd2e52ed063f6355bbed195df8a38ebf3f712f3 (diff)
downloadgnutls-0b2ceb2e945be38e8e64bd6ed7cdddca1ed0ac0b.tar.gz
Merge branch 'gost-priorities' into 'master'
Extend GOST priority settings and documentation See merge request gnutls/gnutls!1160
-rw-r--r--NEWS8
-rw-r--r--doc/cha-gtls-app.texi24
-rw-r--r--doc/cha-intro-tls.texi11
-rw-r--r--lib/priority.c138
-rw-r--r--tests/tls12-cert-key-exchange.c8
-rw-r--r--tests/tls12-server-kx-neg.c32
-rw-r--r--tests/tls13-server-kx-neg.c24
7 files changed, 150 insertions, 95 deletions
diff --git a/NEWS b/NEWS
index 2b4fd94210..accd32daf9 100644
--- a/NEWS
+++ b/NEWS
@@ -20,8 +20,9 @@ See the end for copying conditions.
** libgnutls: Added support for GOST CNT_IMIT ciphersuite (as defined by
draft-smyshlyaev-tls12-gost-suites-06).
- By default this ciphersuite is disabled. One has to add following items to priority strings:
- +VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001.
+ By default this ciphersuite is disabled. One has to enable it by adding
+ +GOST to priority string. It will enable this ciphersuite (and other GOST
+ ciphersuites in future).
Note, that server will fail to negotiate GOST ciphersuites if TLS 1.3 is
enabled both on a server and a client. It is recommended for now to disable
TLS 1.3 in setups where GOST ciphersuites are enabled on GnuTLS-based servers.
@@ -47,6 +48,9 @@ See the end for copying conditions.
** certtool: The add_extension template option is considered even when generating
a certificate from a certificate request.
+** libgnutls: added priority shortcuts for different GOST categories like
+ CIPHER-GOST-ALL, MAC-GOST-ALL, KX-GOST-ALL, SIGN-GOST-ALL, GROUP-GOST-ALL.
+
** API and ABI modifications:
GNUTLS_SFLAGS_CLI_REQUESTED_OCSP: Added
gnutls_ocsp_req_const_t: Added
diff --git a/doc/cha-gtls-app.texi b/doc/cha-gtls-app.texi
index 969aa5c86f..75ac509e34 100644
--- a/doc/cha-gtls-app.texi
+++ b/doc/cha-gtls-app.texi
@@ -1422,20 +1422,23 @@ appended with an algorithm will add this algorithm.
@multitable @columnfractions .20 .70
@headitem Type @tab Keywords
@item Ciphers @tab
-Examples are AES-128-GCM, AES-256-GCM, AES-256-CBC; see also
+Examples are AES-128-GCM, AES-256-GCM, AES-256-CBC, GOST28147-TC26Z-CNT; see also
@ref{tab:ciphers} for more options. Catch all name is CIPHER-ALL which will add
-all the algorithms from NORMAL priority.
+all the algorithms from NORMAL priority. The shortcut for secure GOST
+algorithms is CIPHER-GOST-ALL.
@item Key exchange @tab
RSA, DHE-RSA, DHE-DSS, SRP, SRP-RSA, SRP-DSS,
-PSK, DHE-PSK, ECDHE-PSK, ECDHE-RSA, ECDHE-ECDSA, ANON-ECDH, ANON-DH. The
+PSK, DHE-PSK, ECDHE-PSK, ECDHE-RSA, ECDHE-ECDSA, VKO-GOST-12, ANON-ECDH, ANON-DH.
Catch all name is KX-ALL which will add all the algorithms from NORMAL
priority. Under TLS1.3, the DHE-PSK and ECDHE-PSK strings are equivalent
-and instruct for a Diffie-Hellman key exchange using the enabled groups.
+and instruct for a Diffie-Hellman key exchange using the enabled groups. The
+shortcut for secure GOST algorithms is KX-GOST-ALL.
@item MAC @tab
-MD5, SHA1, SHA256, SHA384, AEAD (used with
-GCM ciphers only). All algorithms from NORMAL priority can be accessed with MAC-ALL.
+MD5, SHA1, SHA256, SHA384, GOST28147-TC26Z-IMIT, AEAD (used with
+GCM ciphers only). All algorithms from NORMAL priority can be accessed with
+MAC-ALL. The shortcut for secure GOST algorithms is MAC-GOST-ALL.
@item Compression algorithms @tab
COMP-NULL, COMP-DEFLATE. Catch all is COMP-ALL.
@@ -1452,8 +1455,10 @@ SIGN-RSA-SHA1, SIGN-RSA-SHA224,
SIGN-RSA-SHA256, SIGN-RSA-SHA384, SIGN-RSA-SHA512, SIGN-DSA-SHA1,
SIGN-DSA-SHA224, SIGN-DSA-SHA256, SIGN-RSA-MD5, SIGN-ECDSA-SHA1,
SIGN-ECDSA-SHA224, SIGN-ECDSA-SHA256, SIGN-ECDSA-SHA384, SIGN-ECDSA-SHA512,
-SIGN-RSA-PSS-SHA256, SIGN-RSA-PSS-SHA384, SIGN-RSA-PSS-SHA512.
+SIGN-RSA-PSS-SHA256, SIGN-RSA-PSS-SHA384, SIGN-RSA-PSS-SHA512,
+SIGN-GOSTR341001, SIGN-GOSTR341012-256, SIGN-GOSTR341012-512.
Catch all which enables all algorithms from NORMAL priority is SIGN-ALL.
+Shortcut which enables secure GOST algorithms is SIGN-GOST-ALL.
This option is only considered for TLS 1.2 and later.
@item Groups @tab
@@ -1485,6 +1490,11 @@ CTYPE-CLI-RAWPK, CTYPE-SRV-RAWPK can be used to specialize on client or server;
catch all is CTYPE-CLI-ALL and CTYPE-SRV-ALL. The type 'X509' is aliased to 'X.509'
for legacy reasons.
+@item Generic @tab
+The keyword GOST is a shortcut for secure GOST algorithms (MACs, ciphers,
+KXes, groups and signatures). For example the following string will enable all
+TLS 1.2 GOST ciphersuites: 'NONE:+VERS-TLS1.2:+GOST'.
+
@end multitable
@caption{The supported algorithm keywords in priority strings.}
@end float
diff --git a/doc/cha-intro-tls.texi b/doc/cha-intro-tls.texi
index b95abc6b81..6600fe9890 100644
--- a/doc/cha-intro-tls.texi
+++ b/doc/cha-intro-tls.texi
@@ -179,6 +179,12 @@ ARCFOUR-128 is a compatible algorithm with RSA's RC4 algorithm, which is conside
secret. It is a considered to be broken, and is only used for compatibility
purposed. For this reason it is not enabled by default.
+@item GOST28147-TC26Z-CNT @tab
+Legacy (stream) @tab
+TLS 1.2 @tab
+This is a 64-bit block cipher GOST 28147-89 with TC26Z S-Box working in CNT
+mode. It is one of the approved ciphers in Russia. It is not enabled by default.
+
@item NULL @tab
Legacy (stream) @tab
TLS 1.0, TLS 1.1, TLS 1.2 @tab
@@ -211,6 +217,11 @@ An HMAC based on SHA2-256. Outputs 256 bits of data.
@item MAC-SHA384 @tab
An HMAC based on SHA2-384. Outputs 384 bits of data.
+@item GOST28147-TC26Z-IMIT @tab
+This is a 64-bit block cipher GOST 28147-89 with TC26Z S-Box working in special
+MAC mode called Imitovstavks. It is one of the approved MAC algorithms in
+Russia. Outputs 32 bits of data. It is not enabled by default.
+
@item MAC-AEAD @tab
This indicates that an authenticated encryption algorithm, such as
GCM, is in use.
diff --git a/lib/priority.c b/lib/priority.c
index c4328d066a..71e0465767 100644
--- a/lib/priority.c
+++ b/lib/priority.c
@@ -297,6 +297,11 @@ static const int _kx_priority_secure[] = {
};
static const int* kx_priority_secure = _kx_priority_secure;
+static const int _kx_priority_gost[] = {
+ GNUTLS_KX_VKO_GOST_12,
+};
+static const int* kx_priority_gost = _kx_priority_gost;
+
static const int _cipher_priority_performance_default[] = {
GNUTLS_CIPHER_AES_128_GCM,
GNUTLS_CIPHER_AES_256_GCM,
@@ -483,6 +488,14 @@ static const int _sign_priority_secure192[] = {
};
static const int* sign_priority_secure192 = _sign_priority_secure192;
+static const int _sign_priority_gost[] = {
+ GNUTLS_SIGN_GOST_256,
+ GNUTLS_SIGN_GOST_512,
+
+ 0
+};
+static const int* sign_priority_gost = _sign_priority_gost;
+
static const int mac_priority_normal_default[] = {
GNUTLS_MAC_SHA1,
GNUTLS_MAC_AEAD,
@@ -499,6 +512,18 @@ static const int *cipher_priority_performance = _cipher_priority_performance_def
static const int *cipher_priority_normal = _cipher_priority_normal_default;
static const int *mac_priority_normal = mac_priority_normal_default;
+static const int _cipher_priority_gost[] = {
+ GNUTLS_CIPHER_GOST28147_TC26Z_CNT,
+ 0
+};
+static const int *cipher_priority_gost = _cipher_priority_gost;
+
+static const int _mac_priority_gost[] = {
+ GNUTLS_MAC_GOST28147_TC26Z_IMIT,
+ 0
+};
+static const int *mac_priority_gost = _mac_priority_gost;
+
/* if called with replace the default priorities with the FIPS140 ones */
void _gnutls_priority_update_fips(void)
{
@@ -1881,6 +1906,8 @@ gnutls_priority_init2(gnutls_priority_t * priority_cache,
}
}
+#define PRIO_MATCH(name) c_strncasecmp(&broken_list[i][1], name, sizeof(name) - 1)
+
/**
* gnutls_priority_init:
* @priority_cache: is a #gnutls_prioritity_t type.
@@ -2004,23 +2031,16 @@ gnutls_priority_init(gnutls_priority_t * priority_cache,
GNUTLS_KX_UNKNOWN) {
if (algo != GNUTLS_KX_INVALID)
fn(&(*priority_cache)->_kx, algo);
- } else if (c_strncasecmp
- (&broken_list[i][1], "VERS-", 5) == 0) {
- if (c_strncasecmp
- (&broken_list[i][1], "VERS-TLS-ALL",
- 12) == 0) {
+ } else if (PRIO_MATCH("VERS-") == 0) {
+ if (PRIO_MATCH("VERS-TLS-ALL") == 0) {
bulk_given_fn(&(*priority_cache)->
protocol,
stream_protocol_priority);
- } else if (c_strncasecmp
- (&broken_list[i][1],
- "VERS-DTLS-ALL", 13) == 0) {
+ } else if (PRIO_MATCH("VERS-DTLS-ALL") == 0) {
bulk_given_fn(&(*priority_cache)->
protocol,
(bulk_given_fn==_add_priority)?dtls_protocol_priority:dgram_protocol_priority);
- } else if (c_strncasecmp
- (&broken_list[i][1],
- "VERS-ALL", 8) == 0) {
+ } else if (PRIO_MATCH("VERS-ALL") == 0) {
bulk_fn(&(*priority_cache)->
protocol,
protocol_priority);
@@ -2036,16 +2056,12 @@ gnutls_priority_init(gnutls_priority_t * priority_cache,
}
} /* now check if the element is something like -ALGO */
- else if (c_strncasecmp
- (&broken_list[i][1], "COMP-", 5) == 0) {
+ else if (PRIO_MATCH("COMP-") == 0) {
/* ignore all compression methods */
continue;
} /* now check if the element is something like -ALGO */
- else if (c_strncasecmp
- (&broken_list[i][1], "CURVE-", 6) == 0) {
- if (c_strncasecmp
- (&broken_list[i][1], "CURVE-ALL",
- 9) == 0) {
+ else if (PRIO_MATCH("CURVE-") == 0) {
+ if (PRIO_MATCH("CURVE-ALL") == 0) {
bulk_fn(&(*priority_cache)->
_supported_ecc,
supported_groups_normal);
@@ -2059,29 +2075,20 @@ gnutls_priority_init(gnutls_priority_t * priority_cache,
else
goto error;
}
- } else if (c_strncasecmp
- (&broken_list[i][1], "GROUP-", 6) == 0) {
- if (c_strncasecmp
- (&broken_list[i][1], "GROUP-ALL",
- 9) == 0) {
+ } else if (PRIO_MATCH("GROUP-") == 0) {
+ if (PRIO_MATCH("GROUP-ALL") == 0) {
bulk_fn(&(*priority_cache)->
_supported_ecc,
supported_groups_normal);
- } else if (strncasecmp
- (&broken_list[i][1], "GROUP-DH-ALL",
- 12) == 0) {
+ } else if (PRIO_MATCH("GROUP-DH-ALL") == 0) {
bulk_given_fn(&(*priority_cache)->
_supported_ecc,
_supported_groups_dh);
- } else if (strncasecmp
- (&broken_list[i][1], "GROUP-EC-ALL",
- 12) == 0) {
+ } else if (PRIO_MATCH("GROUP-EC-ALL") == 0) {
bulk_given_fn(&(*priority_cache)->
_supported_ecc,
_supported_groups_ecdh);
- } else if (strncasecmp
- (&broken_list[i][1], "GROUP-GOST-ALL",
- 12) == 0) {
+ } else if (PRIO_MATCH("GROUP-GOST-ALL") == 0) {
bulk_given_fn(&(*priority_cache)->
_supported_ecc,
_supported_groups_gost);
@@ -2095,17 +2102,17 @@ gnutls_priority_init(gnutls_priority_t * priority_cache,
else
goto error;
}
- } else if (strncasecmp(&broken_list[i][1], "CTYPE-", 6) == 0) {
+ } else if (PRIO_MATCH("CTYPE-") == 0) {
// Certificate types
- if (strncasecmp(&broken_list[i][1], "CTYPE-ALL", 9) == 0) {
+ if (PRIO_MATCH("CTYPE-ALL") == 0) {
// Symmetric cert types, all types allowed
bulk_fn(&(*priority_cache)->client_ctype,
cert_type_priority_all);
bulk_fn(&(*priority_cache)->server_ctype,
cert_type_priority_all);
- } else if (strncasecmp(&broken_list[i][1], "CTYPE-CLI-", 10) == 0) {
+ } else if (PRIO_MATCH("CTYPE-CLI-") == 0) {
// Client certificate types
- if (strncasecmp(&broken_list[i][1], "CTYPE-CLI-ALL", 13) == 0) {
+ if (PRIO_MATCH("CTYPE-CLI-ALL") == 0) {
// All client cert types allowed
bulk_fn(&(*priority_cache)->client_ctype,
cert_type_priority_all);
@@ -2114,9 +2121,9 @@ gnutls_priority_init(gnutls_priority_t * priority_cache,
// Specific client cert type allowed
fn(&(*priority_cache)->client_ctype, algo);
} else goto error;
- } else if (strncasecmp(&broken_list[i][1], "CTYPE-SRV-", 10) == 0) {
+ } else if (PRIO_MATCH("CTYPE-SRV-") == 0) {
// Server certificate types
- if (strncasecmp(&broken_list[i][1], "CTYPE-SRV-ALL", 13) == 0) {
+ if (PRIO_MATCH("CTYPE-SRV-ALL") == 0) {
// All server cert types allowed
bulk_fn(&(*priority_cache)->server_ctype,
cert_type_priority_all);
@@ -2130,19 +2137,20 @@ gnutls_priority_init(gnutls_priority_t * priority_cache,
(&broken_list[i][7])) != GNUTLS_CRT_UNKNOWN) {
fn(&(*priority_cache)->client_ctype, algo);
fn(&(*priority_cache)->server_ctype, algo);
- } else if (strncasecmp(&broken_list[i][1], "CTYPE-OPENPGP", 13) == 0) {
+ } else if (PRIO_MATCH("CTYPE-OPENPGP") == 0) {
/* legacy openpgp option - ignore */
continue;
} else goto error;
}
- } else if (strncasecmp
- (&broken_list[i][1], "SIGN-", 5) == 0) {
- if (strncasecmp
- (&broken_list[i][1], "SIGN-ALL",
- 8) == 0) {
+ } else if (PRIO_MATCH("SIGN-") == 0) {
+ if (PRIO_MATCH("SIGN-ALL") == 0) {
bulk_fn(&(*priority_cache)->
_sign_algo,
sign_priority_default);
+ } else if (PRIO_MATCH("SIGN-GOST-ALL") == 0) {
+ bulk_fn(&(*priority_cache)->
+ _sign_algo,
+ sign_priority_gost);
} else {
if ((algo =
gnutls_sign_get_id
@@ -2153,19 +2161,41 @@ gnutls_priority_init(gnutls_priority_t * priority_cache,
else
goto error;
}
- } else if (c_strncasecmp
- (&broken_list[i][1], "MAC-ALL", 7) == 0) {
+ } else if (PRIO_MATCH("MAC-") == 0) {
+ if (PRIO_MATCH("MAC-ALL") == 0) {
+ bulk_fn(&(*priority_cache)->_mac,
+ mac_priority_normal);
+ } else if (PRIO_MATCH("MAC-GOST-ALL") == 0) {
+ bulk_fn(&(*priority_cache)->_mac,
+ mac_priority_gost);
+ }
+ } else if (PRIO_MATCH("CIPHER-") == 0) {
+ if (PRIO_MATCH("CIPHER-ALL") == 0) {
+ bulk_fn(&(*priority_cache)->_cipher,
+ cipher_priority_normal);
+ } else if (PRIO_MATCH("CIPHER-GOST-ALL") == 0) {
+ bulk_fn(&(*priority_cache)->_cipher,
+ cipher_priority_gost);
+ }
+ } else if (PRIO_MATCH("KX-") == 0) {
+ if (PRIO_MATCH("KX-ALL") == 0) {
+ bulk_fn(&(*priority_cache)->_kx,
+ kx_priority_secure);
+ } else if (PRIO_MATCH("KX-GOST-ALL") == 0) {
+ bulk_fn(&(*priority_cache)->_kx,
+ kx_priority_gost);
+ }
+ } else if (PRIO_MATCH("GOST") == 0) {
+ bulk_given_fn(&(*priority_cache)->_supported_ecc,
+ _supported_groups_gost);
+ bulk_fn(&(*priority_cache)->_sign_algo,
+ sign_priority_gost);
bulk_fn(&(*priority_cache)->_mac,
- mac_priority_normal);
- } else if (c_strncasecmp
- (&broken_list[i][1], "CIPHER-ALL",
- 10) == 0) {
+ mac_priority_gost);
bulk_fn(&(*priority_cache)->_cipher,
- cipher_priority_normal);
- } else if (c_strncasecmp
- (&broken_list[i][1], "KX-ALL", 6) == 0) {
+ cipher_priority_gost);
bulk_fn(&(*priority_cache)->_kx,
- kx_priority_secure);
+ kx_priority_gost);
} else
goto error;
} else if (broken_list[i][0] == '%') {
diff --git a/tests/tls12-cert-key-exchange.c b/tests/tls12-cert-key-exchange.c
index 1b3d77fbf1..862fe85894 100644
--- a/tests/tls12-cert-key-exchange.c
+++ b/tests/tls12-cert-key-exchange.c
@@ -155,10 +155,10 @@ void doit(void)
server_priority = "NORMAL:+CTYPE-ALL"
":+VKO-GOST-12"
":+GROUP-GOST-ALL"
- ":+GOST28147-TC26Z-CNT"
- ":+GOST28147-TC26Z-IMIT"
- ":+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001";
- const char *gost_client_prio = "NORMAL:-VERS-ALL:+VERS-TLS1.2:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001";
+ ":+CIPHER-GOST-ALL"
+ ":+MAC-GOST-ALL"
+ ":+SIGN-GOST-ALL";
+ const char *gost_client_prio = "NORMAL:-VERS-ALL:+VERS-TLS1.2:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL";
try_with_key("TLS 1.2 with gost12 256 no-cli-cert (ctype X.509)", gost_client_prio, GNUTLS_KX_VKO_GOST_12, GNUTLS_SIGN_GOST_256, GNUTLS_SIGN_UNKNOWN,
&server_ca3_gost12_256_cert, &server_ca3_gost12_256_key, NULL, NULL, 0, GNUTLS_CRT_X509, GNUTLS_CRT_UNKNOWN);
try_with_key("TLS 1.2 with gost12 256 ask cli-cert (ctype X.509)", gost_client_prio, GNUTLS_KX_VKO_GOST_12, GNUTLS_SIGN_GOST_256, GNUTLS_SIGN_UNKNOWN,
diff --git a/tests/tls12-server-kx-neg.c b/tests/tls12-server-kx-neg.c
index 2d36c28882..e3a2de363a 100644
--- a/tests/tls12-server-kx-neg.c
+++ b/tests/tls12-server-kx-neg.c
@@ -469,8 +469,8 @@ test_case_st tests[] = {
.client_ret = GNUTLS_E_AGAIN,
.server_ret = GNUTLS_E_INSUFFICIENT_CREDENTIALS,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2"
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2"
},
{
.name = "TLS 1.2 VKO-GOST-12 with cred but no cert",
@@ -478,8 +478,8 @@ test_case_st tests[] = {
.server_ret = GNUTLS_E_NO_CIPHER_SUITES,
.have_cert_cred = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2"
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2"
},
{
.name = "TLS 1.2 VKO-GOST-12 with cred but no GOST cert",
@@ -489,8 +489,8 @@ test_case_st tests[] = {
.have_rsa_sign_cert = 1,
.have_rsa_decrypt_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2"
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2"
},
{
.name = "TLS 1.2 VKO-GOST-12 with cred and GOST12-256 cert",
@@ -499,8 +499,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_256_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2"
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2"
},
{
.name = "TLS 1.2 VKO-GOST-12 with cred and GOST12-512 cert",
@@ -509,8 +509,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_512_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2"
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2"
},
{
.name = "TLS 1.2 VKO-GOST-12 with cred and multiple certs",
@@ -523,8 +523,8 @@ test_case_st tests[] = {
.have_gost12_256_cert = 1,
.have_gost12_512_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2"
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2"
},
{
.name = "TLS 1.2 VKO-GOST-12 with cred and GOST12-256 cert client lacking signature algs (like SChannel)",
@@ -533,8 +533,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_256_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NONE:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+VERS-TLS1.2:+SIGN-RSA-SHA256"
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NONE:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+VERS-TLS1.2:+SIGN-RSA-SHA256"
},
{
.name = "TLS 1.2 VKO-GOST-12 with cred and GOST12-512 cert client lacking signature algs (like SChannel)",
@@ -543,8 +543,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_512_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NONE:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+VERS-TLS1.2:+SIGN-RSA-SHA256"
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NONE:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+VERS-TLS1.2:+SIGN-RSA-SHA256"
},
#endif
};
diff --git a/tests/tls13-server-kx-neg.c b/tests/tls13-server-kx-neg.c
index 0c8a20979c..a4cca3faaf 100644
--- a/tests/tls13-server-kx-neg.c
+++ b/tests/tls13-server-kx-neg.c
@@ -232,8 +232,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_256_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:"PVERSION,
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:" "-VERS-ALL:+VERS-TLS1.2",
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:"PVERSION,
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:" "-VERS-ALL:+VERS-TLS1.2",
.exp_version = GNUTLS_TLS1_2,
},
{
@@ -243,8 +243,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_512_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:"PVERSION,
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:" "-VERS-ALL:+VERS-TLS1.2",
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:"PVERSION,
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:" "-VERS-ALL:+VERS-TLS1.2",
.exp_version = GNUTLS_TLS1_2,
},
{
@@ -254,8 +254,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_256_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:" "-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:"PVERSION,
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:" "-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:"PVERSION,
.exp_version = GNUTLS_TLS1_2,
},
{
@@ -265,8 +265,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_512_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:" "-VERS-ALL:+VERS-TLS1.2",
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:"PVERSION,
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:" "-VERS-ALL:+VERS-TLS1.2",
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:"PVERSION,
.exp_version = GNUTLS_TLS1_2,
},
/* Ideally for the next two test cases we should fallback to TLS 1.2 + GOST
@@ -278,8 +278,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_256_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:"PVERSION,
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:"PVERSION,
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:"PVERSION,
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:"PVERSION,
.exp_version = GNUTLS_TLS1_2,
},
{
@@ -289,8 +289,8 @@ test_case_st tests[] = {
.have_cert_cred = 1,
.have_gost12_512_cert = 1,
.not_on_fips = 1,
- .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:"PVERSION,
- .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+GOST28147-TC26Z-CNT:+GOST28147-TC26Z-IMIT:+SIGN-GOSTR341012-512:+SIGN-GOSTR341012-256:+SIGN-GOSTR341001:"PVERSION,
+ .server_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:"PVERSION,
+ .client_prio = "NORMAL:-KX-ALL:+VKO-GOST-12:+GROUP-GOST-ALL:+CIPHER-GOST-ALL:+MAC-GOST-ALL:+SIGN-GOST-ALL:"PVERSION,
.exp_version = GNUTLS_TLS1_2,
},
#endif