diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic.c | 14 | ||||
-rw-r--r-- | tests/pkcs1v2.c | 13 |
2 files changed, 22 insertions, 5 deletions
diff --git a/tests/basic.c b/tests/basic.c index 26980e15..b4102c9f 100644 --- a/tests/basic.c +++ b/tests/basic.c @@ -16892,21 +16892,24 @@ check_pubkey_crypt (int n, gcry_sexp_t skey, gcry_sexp_t pkey, int algo, "(flags oaep)", 1, 0, - 0 }, + 0, + FLAG_NOFIPS }, { GCRY_PK_RSA, "(data\n (flags oaep)\n (hash-algo sha1)\n" " (value #11223344556677889900AA#))\n", "(flags oaep)(hash-algo sha1)", 1, 0, - 0 }, + 0, + FLAG_NOFIPS }, { GCRY_PK_RSA, "(data\n (flags oaep)\n (hash-algo sha1)\n (label \"test\")\n" " (value #11223344556677889900AA#))\n", "(flags oaep)(hash-algo sha1)(label \"test\")", 1, 0, - 0 }, + 0, + FLAG_NOFIPS }, { GCRY_PK_RSA, "(data\n (flags oaep)\n (hash-algo sha1)\n (label \"test\")\n" " (value #11223344556677889900AA#)\n" @@ -16914,7 +16917,8 @@ check_pubkey_crypt (int n, gcry_sexp_t skey, gcry_sexp_t pkey, int algo, "(flags oaep)(hash-algo sha1)(label \"test\")", 1, 0, - 0 }, + 0, + FLAG_NOFIPS }, { 0, "(data\n (flags )\n" " (value #11223344556677889900AA#))\n", NULL, @@ -16960,7 +16964,7 @@ check_pubkey_crypt (int n, gcry_sexp_t skey, gcry_sexp_t pkey, int algo, "(flags pkcs1)", 1, 0, - GPG_ERR_ENCODING_PROBLEM, FLAG_SPECIAL }, + GPG_ERR_ENCODING_PROBLEM, FLAG_SPECIAL | FLAG_NOFIPS }, { 0, "(data\n (flags pss)\n" " (value #11223344556677889900AA#))\n", diff --git a/tests/pkcs1v2.c b/tests/pkcs1v2.c index 6c7f3d81..2fd495d5 100644 --- a/tests/pkcs1v2.c +++ b/tests/pkcs1v2.c @@ -186,11 +186,24 @@ check_oaep (void) err = gcry_pk_encrypt (&ciph, plain, pub_key); if (err) { + if (in_fips_mode) + { + gcry_sexp_release (plain); + plain = NULL; + continue; + } show_sexp ("plain:\n", ciph); fail ("gcry_pk_encrypt failed: %s\n", gpg_strerror (err)); } else { + if (in_fips_mode) + { + fail ("The OAEP encryption unexpectedly worked in FIPS mode\n"); + gcry_sexp_release (plain); + plain = NULL; + continue; + } if (extract_cmp_data (ciph, "a", tbl[tno].m[mno].encr, tbl[tno].m[mno].desc)) { |