1 1.1 christos Running external test suites with OpenSSL 2 1.1 christos ========================================= 3 1.1 christos 4 1.1 christos It is possible to integrate external test suites into OpenSSL's `make test`. 5 1.1 christos This capability is considered a developer option and does not work on all 6 1.1 christos platforms. 7 1.1 christos 8 1.1 christos Python PYCA/Cryptography test suite 9 1.1 christos =================================== 10 1.1 christos 11 1.1 christos This python test suite runs cryptographic tests with a local OpenSSL build as 12 1.1 christos the implementation. 13 1.1 christos 14 1.1 christos First checkout the `PYCA/Cryptography` module into `./pyca-cryptography` using: 15 1.1 christos 16 1.1 christos $ git submodule update --init 17 1.1 christos 18 1.1 christos Then configure/build OpenSSL compatible with the python module: 19 1.1 christos 20 1.1 christos $ ./config enable-external-tests 21 1.1 christos $ make 22 1.1 christos 23 1.1 christos The tests will run in a python virtual environment which requires virtualenv 24 1.1 christos to be installed. 25 1.1 christos 26 1.1 christos $ make test VERBOSE=1 TESTS=test_external_pyca 27 1.1 christos 28 1.1 christos Test failures and suppressions 29 1.1 christos ------------------------------ 30 1.1 christos 31 1.1 christos Some tests target older (<=1.0.2) versions so will not run. Other tests target 32 1.1 christos other crypto implementations so are not relevant. Currently no tests fail. 33 1.1 christos 34 1.1 christos krb5 test suite 35 1.1 christos =============== 36 1.1 christos 37 1.1 christos Much like the PYCA/Cryptography test suite, this builds and runs the krb5 38 1.1 christos tests against the local OpenSSL build. 39 1.1 christos 40 1.1 christos You will need a git checkout of krb5 at the top level: 41 1.1 christos 42 1.1.1.2 christos $ git submodule update --init 43 1.1 christos 44 1.1 christos krb5's master has to pass this same CI, but a known-good version is 45 1.1 christos krb5-1.15.1-final if you want to be sure. 46 1.1 christos 47 1.1 christos $ cd krb5 48 1.1 christos $ git checkout krb5-1.15.1-final 49 1.1 christos $ cd .. 50 1.1 christos 51 1.1 christos OpenSSL must be built with external tests enabled: 52 1.1 christos 53 1.1 christos $ ./config enable-external-tests 54 1.1 christos $ make 55 1.1 christos 56 1.1 christos krb5's tests will then be run as part of the rest of the suite, or can be 57 1.1 christos explicitly run (with more debugging): 58 1.1 christos 59 1.1 christos $ VERBOSE=1 make TESTS=test_external_krb5 test 60 1.1 christos 61 1.1 christos Test-failures suppressions 62 1.1 christos -------------------------- 63 1.1 christos 64 1.1 christos krb5 will automatically adapt its test suite to account for the configuration 65 1.1 christos of your system. Certain tests may require more installed packages to run. No 66 1.1 christos tests are expected to fail. 67 1.1 christos 68 1.1 christos GOST engine test suite 69 1.1 christos ====================== 70 1.1 christos 71 1.1 christos Much like the PYCA/Cryptography test suite, this builds and runs the GOST engine 72 1.1 christos tests against the local OpenSSL build. 73 1.1 christos 74 1.1 christos You will need a git checkout of gost-engine at the top level: 75 1.1 christos 76 1.1 christos $ git submodule update --init 77 1.1 christos 78 1.1 christos Then configure/build OpenSSL enabling external tests: 79 1.1 christos 80 1.1 christos $ ./config enable-external-tests 81 1.1 christos $ make 82 1.1 christos 83 1.1 christos GOST engine requires CMake for the build process. 84 1.1 christos 85 1.1 christos GOST engine tests will then be run as part of the rest of the suite, or can be 86 1.1 christos explicitly run (with more debugging): 87 1.1 christos 88 1.1 christos $ make test VERBOSE=1 TESTS=test_external_gost_engine 89 1.1 christos 90 1.1 christos OQSprovider test suite 91 1.1 christos ====================== 92 1.1 christos 93 1.1 christos Much like the PYCA/Cryptography test suite, this builds and runs the OQS 94 1.1 christos (OpenQuantumSafe -- www.openquantumsafe.org) provider tests against the 95 1.1 christos local OpenSSL build. 96 1.1 christos 97 1.1 christos You will need a git checkout of oqsprovider at the top level: 98 1.1 christos 99 1.1 christos $ git submodule update --init 100 1.1 christos 101 1.1 christos Then configure/build OpenSSL enabling external tests: 102 1.1 christos 103 1.1 christos $ ./config enable-external-tests 104 1.1 christos $ make 105 1.1 christos 106 1.1 christos oqsprovider requires CMake for the build process. 107 1.1 christos 108 1.1 christos OQSprovider tests will then be run as part of the rest of the suite, or can be 109 1.1 christos explicitly run (with more debugging): 110 1.1 christos 111 1.1 christos $ make test VERBOSE=1 TESTS=test_external_oqsprovider 112 1.1 christos 113 1.1 christos The names of all supported quantum-safe algorithms are available at 114 1.1 christos <https://github.com/open-quantum-safe/oqs-provider#algorithms>. 115 1.1 christos 116 1.1 christos Please note specific limitations of oqsprovider operations dependent on specific 117 1.1 christos openssl versions as documented at 118 1.1 christos <https://github.com/open-quantum-safe/oqs-provider#note-on-openssl-versions>. 119 1.1 christos 120 1.1 christos pkcs11-provider test suite 121 1.1 christos ========================== 122 1.1 christos 123 1.1 christos This builds and runs pkcs11-provider tests against the local OpenSSL build. 124 1.1 christos 125 1.1 christos You will need a git checkout of pkcs11-provider at the top level: 126 1.1 christos 127 1.1 christos $ git submodule update --init 128 1.1 christos 129 1.1 christos Then configure/build OpenSSL enabling external tests: 130 1.1 christos 131 1.1 christos $ ./config enable-external-tests 132 1.1 christos $ make 133 1.1 christos 134 1.1 christos pkcs11-provider requires meson for the build process. Moreover, it requires 135 1.1 christos softhsm and nss softokn tokens and certtool, certutil, pkcs11-tool and expect 136 1.1 christos to run the tests. 137 1.1 christos 138 1.1 christos Tests will then be run as part of the rest of the suite, or can be 139 1.1 christos explicitly run (with more debugging): 140 1.1 christos 141 1.1 christos $ make test VERBOSE=1 TESTS=test_external_pkcs11_provider 142 1.1 christos 143 1.1 christos Test failures and suppressions 144 1.1 christos ------------------------------ 145 1.1 christos 146 1.1 christos There are tests for different software tokens - softhsm, nss-softokn and kryoptic. 147 1.1 christos Kryoptic tests will not run at this point. Currently no test fails. 148 1.1 christos 149 1.1 christos Updating test suites 150 1.1 christos ==================== 151 1.1 christos 152 1.1 christos To update the commit for any of the above test suites: 153 1.1 christos 154 1.1 christos - Make sure the submodules are cloned locally: 155 1.1 christos 156 1.1 christos $ git submodule update --init --recursive 157 1.1 christos 158 1.1 christos - Enter subdirectory and pull from the repository (use a specific branch/tag if required): 159 1.1 christos 160 1.1 christos $ cd `<submodule-dir>` 161 1.1 christos $ git pull origin master 162 1.1 christos 163 1.1 christos - Go to root directory, there should be a new git status: 164 1.1 christos 165 1.1 christos $ cd ../ 166 1.1 christos $ git status 167 1.1 christos ... 168 1.1 christos # modified: `<submodule-dir>` (new commits) 169 1.1 christos ... 170 1.1 christos 171 1.1 christos - Add/commit/push the update 172 1.1 christos 173 1.1 christos $ git add `<submodule-dir>` 174 1.1 christos $ git commit -m `"Updated <submodule> to latest commit"` 175 1.1 christos $ git push 176