summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2019-11-23 23:18:37 +0000
committerDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2019-11-23 23:18:37 +0000
commitdd5dee2ed68d93c8915c91b4965313de57da2943 (patch)
treebcb6a0188707fa309c8730127b8782f8c4184d68
parent6ace855ba7c55181644b5911f4e9ba62b8cee047 (diff)
parentc4b7b23e00cc4e5d92f38fda0cadee8ef349016f (diff)
downloadgnutls-dd5dee2ed68d93c8915c91b4965313de57da2943.tar.gz
Merge branch 'minimal-check' into 'master'
Run tests under minimal configuration See merge request gnutls/gnutls!1122
-rw-r--r--.gitlab-ci.yml1
-rw-r--r--tests/cert-tests/data/gost-cert-nogost.pem1
-rw-r--r--tests/key-export-pkcs8.c2
-rw-r--r--tests/key-import-export.c6
-rw-r--r--tests/privkey-keygen.c18
5 files changed, 23 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0abe46ae7d..f9fc9a9949 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -135,6 +135,7 @@ minimal.Fedora.x86_64:
--disable-guile
- make clean
- make -j$(nproc)
+ - make -j$(nproc) check
tags:
- shared
except:
diff --git a/tests/cert-tests/data/gost-cert-nogost.pem b/tests/cert-tests/data/gost-cert-nogost.pem
index bf280349fd..76fcd3d8b9 100644
--- a/tests/cert-tests/data/gost-cert-nogost.pem
+++ b/tests/cert-tests/data/gost-cert-nogost.pem
@@ -6,6 +6,7 @@ X.509 Certificate Information:
Not Before: Fri Aug 17 06:47:36 UTC 2012
Not After: Sat Aug 17 06:47:36 UTC 2013
Subject: CN=SuperTerm0000001,OU=SuperPlat Terminals,O=SuperPlat,L=Moscow,ST=Russia,C=RU
+error importing public key: The curve is unsupported
Subject Public Key Algorithm: GOST R 34.10-2001
Extensions:
Basic Constraints (not critical):
diff --git a/tests/key-export-pkcs8.c b/tests/key-export-pkcs8.c
index aa11bd7405..9956e505ca 100644
--- a/tests/key-export-pkcs8.c
+++ b/tests/key-export-pkcs8.c
@@ -172,6 +172,7 @@ int check_ed25519(void)
static
int check_gost(void)
{
+#ifdef ENABLE_GOST
gnutls_x509_privkey_t key;
gnutls_datum_t out;
int ret;
@@ -193,6 +194,7 @@ int check_gost(void)
gnutls_free(out.data);
gnutls_x509_privkey_deinit(key);
+#endif
return 0;
}
diff --git a/tests/key-import-export.c b/tests/key-import-export.c
index 47b8804c32..45434eeb2d 100644
--- a/tests/key-import-export.c
+++ b/tests/key-import-export.c
@@ -289,8 +289,10 @@ int check_privkey_import_export(void)
gnutls_datum_t p, q, g, y, x;
gnutls_datum_t m, e, u, e1, e2, d;
gnutls_ecc_curve_t curve;
+#ifdef ENABLE_GOST
gnutls_digest_algorithm_t digest;
gnutls_gost_paramset_t paramset;
+#endif
int ret;
global_init();
@@ -473,6 +475,7 @@ int check_privkey_import_export(void)
gnutls_privkey_deinit(key);
/* GOST */
+#ifdef ENABLE_GOST
ret = gnutls_privkey_init(&key);
if (ret < 0)
fail("error\n");
@@ -527,6 +530,7 @@ int check_privkey_import_export(void)
gnutls_free(y.data);
gnutls_free(p.data);
gnutls_privkey_deinit(key);
+#endif
return 0;
}
@@ -891,6 +895,7 @@ int check_ed25519(void)
static
int check_gost(void)
{
+#ifdef ENABLE_GOST
gnutls_privkey_t key;
gnutls_pubkey_t pub;
gnutls_datum_t y, x, k;
@@ -993,6 +998,7 @@ int check_gost(void)
gnutls_privkey_deinit(key);
gnutls_pubkey_deinit(pub);
+#endif
return 0;
}
diff --git a/tests/privkey-keygen.c b/tests/privkey-keygen.c
index ad0bad8675..7491e3cf33 100644
--- a/tests/privkey-keygen.c
+++ b/tests/privkey-keygen.c
@@ -125,12 +125,20 @@ void doit(void)
algorithm == GNUTLS_PK_ECDH_X25519)
continue;
- if (gnutls_fips140_mode_enabled() &&
- (algorithm == GNUTLS_PK_GOST_01 ||
- algorithm == GNUTLS_PK_GOST_12_256 ||
- algorithm == GNUTLS_PK_GOST_12_512))
+ if (algorithm == GNUTLS_PK_GOST_01 ||
+ algorithm == GNUTLS_PK_GOST_12_256 ||
+ algorithm == GNUTLS_PK_GOST_12_512) {
+ /* Skip GOST algorithms:
+ * - If they are disabled by ./configure option
+ * - Or in FIPS140 mode
+ */
+#ifdef ENABLE_GOST
+ if (gnutls_fips140_mode_enabled())
+ continue;
+#else
continue;
-
+#endif
+ }
ret = gnutls_x509_privkey_init(&pkey);
if (ret < 0) {