File explicit-EC-test-option.patch of Package pkcs11-provider

Index: pkcs11-provider-0.6/meson_options.txt
===================================================================
--- pkcs11-provider-0.6.orig/meson_options.txt
+++ pkcs11-provider-0.6/meson_options.txt
@@ -2,3 +2,8 @@ option('preload_libasan',
        type: 'string',
        value: 'no',
        description: 'Path to libasan.so to preload')
+
+option('disable_explicit_EC_test',
+       type: 'boolean',
+       value: false,
+       description: 'Disable explicit EC tests')
Index: pkcs11-provider-0.6/tests/meson.build
===================================================================
--- pkcs11-provider-0.6.orig/tests/meson.build
+++ pkcs11-provider-0.6/tests/meson.build
@@ -30,6 +30,10 @@ if nss_softokn.found()
   endif
 endif
 
+if get_option('disable_explicit_EC_test')
+  conf_env.set('DISABLE_EXPLICIT_EC_TEST', '1')
+endif
+
 setup_script=find_program('setup.sh')
 foreach suite : ['softokn', 'softhsm', 'kryoptic']
   test(
@@ -47,6 +51,10 @@ test_env = environment({
   'TESTBLDDIR': meson.current_build_dir(),
 })
 
+if get_option('disable_explicit_EC_test')
+  test_env.set('DISABLE_EXPLICIT_EC_TEST', '1')
+endif
+
 valgrind = find_program('valgrind', required: false)
 if valgrind.found()
   add_test_setup('valgrind',
@@ -96,6 +104,7 @@ if get_option('b_sanitize') == 'address'
   endif
 endif
 
+
 test_programs = {
   'tsession': ['tsession.c'],
   'tgenkey': ['tgenkey.c'],
Index: pkcs11-provider-0.6/tests/setup.sh
===================================================================
--- pkcs11-provider-0.6.orig/tests/setup.sh
+++ pkcs11-provider-0.6/tests/setup.sh
@@ -303,8 +303,8 @@ echo "${ECPRI2URI}"
 echo "${ECCRT2URI}"
 echo ""
 
-if [ -f /etc/redhat-release ]; then
-    title PARA "explicit EC unsupported on Fedora/EL"
+if [ -n "${DISABLE_EXPLICIT_EC_TEST}" ]; then
+    title PARA "explicit EC unsupported"
 elif [ "${TOKENTYPE}" == "softokn" ]; then
     title PARA "explicit EC unsupported with softokn"
 else
Index: pkcs11-provider-0.6/tests/tecxc
===================================================================
--- pkcs11-provider-0.6.orig/tests/tecxc
+++ pkcs11-provider-0.6/tests/tecxc
@@ -4,7 +4,7 @@
 
 # On Fedora/EL completely removed support for explicit EC from libcrypto,
 # so skip the test completely
-if [ -f /etc/redhat-release ]; then
+if [ -n "${DISABLE_EXPLICIT_EC_TEST}" ]; then
     exit 0
 fi
 
openSUSE Build Service is sponsored by