With fips provider 3.0.0 skip tests related to explicit curves handling
[openssl.git] / test / testutil.h
index 3a3e0f279e37b7e52dfbacfa7089b82da9ec15af..0a050bb060edb566b729ca08c5f0d986389b2eab 100644 (file)
@@ -240,7 +240,7 @@ void cleanup_tests(void);
 /*
  * Helper functions to detect specific versions of the FIPS provider being in use.
  * Because of FIPS rules, code changes after a module has been validated are
- * difficult and because we provide an hard guarantee of ABI and behavioural
+ * difficult and because we provide a hard guarantee of ABI and behavioural
  * stability going forwards, it is a requirement to have tests be conditional
  * on specific FIPS provider versions.  Without this, bug fixes cannot be tested
  * in later releases.
@@ -259,6 +259,17 @@ int fips_provider_version_ne(OSSL_LIB_CTX *libctx, int major, int minor, int pat
 int fips_provider_version_le(OSSL_LIB_CTX *libctx, int major, int minor, int patch);
 int fips_provider_version_gt(OSSL_LIB_CTX *libctx, int major, int minor, int patch);
 
+/*
+ * This function matches fips provider version with (potentially multiple)
+ * <operator>maj.min.patch version strings in versions.
+ * The operator can be one of = ! <= or > comparison symbols.
+ * If the fips provider matches all the version comparisons (or if there is no
+ * fips provider available) the function returns 1.
+ * If the fips provider does not match the version comparisons, it returns 0.
+ * On error the function returns -1.
+ */
+int fips_provider_version_match(OSSL_LIB_CTX *libctx, const char *versions);
+
 /*
  * Used to supply test specific command line options,
  * If non optional parameters are used, then the first entry in the OPTIONS[]