1 Running external test suites with OpenSSL
2 =========================================
4 It is possible to integrate external test suites into OpenSSL's `make test`.
5 This capability is considered a developer option and does not work on all
8 The BoringSSL test suite
9 ========================
11 In order to run the BoringSSL tests with OpenSSL, first checkout the BoringSSL
12 source code into an appropriate directory. This can be done in two ways:
14 1) Separately from the OpenSSL checkout using:
16 $ git clone https://boringssl.googlesource.com/boringssl boringssl
18 The BoringSSL tests are only confirmed to work at a specific commit in the
19 BoringSSL repository. Later commits may or may not pass the test suite:
22 $ git checkout 490469f850e
24 2) Using the already configured submodule settings in OpenSSL:
26 $ git submodule update --init
28 Configure the OpenSSL source code to enable the external tests:
31 $ ./config enable-ssl3 enable-ssl3-method enable-weak-ssl-ciphers \
34 Note that using other config options than those given above may cause the tests
37 Run the OpenSSL tests by providing the path to the BoringSSL test runner in the
38 `BORING_RUNNER_DIR` environment variable:
40 $ BORING_RUNNER_DIR=/path/to/boringssl/ssl/test/runner make test
42 Note that the test suite may change directory while running so the path provided
43 should be absolute and not relative to the current working directory.
45 To see more detailed output you can run just the BoringSSL tests with the
48 $ VERBOSE=1 BORING_RUNNER_DIR=/path/to/boringssl/ssl/test/runner make \
49 TESTS="test_external_boringssl" test
51 Test failures and suppressions
52 ------------------------------
54 A large number of the BoringSSL tests are known to fail. A test could fail
55 because of many possible reasons. For example:
58 - Different interpretations of standards
59 - Assumptions about the way BoringSSL works that do not apply to OpenSSL
60 - The test uses APIs added to BoringSSL that are not present in OpenSSL
63 In order to provide a "clean" baseline run with all the tests passing a config
64 file has been provided that suppresses the running of tests that are known to
65 fail. These suppressions are held in the file "test/ossl_shim/ossl_config.json"
66 within the OpenSSL source code.
68 The community is encouraged to contribute patches which reduce the number of
69 suppressions that are currently present.
71 Python PYCA/Cryptography test suite
72 ===================================
74 This python test suite runs cryptographic tests with a local OpenSSL build as
77 First checkout the `PYCA/Cryptography` module into `./pyca-cryptography` using:
79 $ git submodule update --init
81 Then configure/build OpenSSL compatible with the python module:
83 $ ./config shared enable-external-tests
86 The tests will run in a python virtual environment which requires virtualenv
89 $ make test VERBOSE=1 TESTS=test_external_pyca
91 Test failures and suppressions
92 ------------------------------
94 Some tests target older (<=1.0.2) versions so will not run. Other tests target
95 other crypto implementations so are not relevant. Currently no tests fail.
100 Much like the PYCA/Cryptography test suite, this builds and runs the krb5
101 tests against the local OpenSSL build.
103 You will need a git checkout of krb5 at the top level:
105 $ git clone https://github.com/krb5/krb5
107 krb5's master has to pass this same CI, but a known-good version is
108 krb5-1.15.1-final if you want to be sure.
111 $ git checkout krb5-1.15.1-final
114 OpenSSL must be built with external tests enabled:
116 $ ./config enable-external-tests
119 krb5's tests will then be run as part of the rest of the suite, or can be
120 explicitly run (with more debugging):
122 $ VERBOSE=1 make TESTS=test_external_krb5 test
124 Test-failures suppressions
125 --------------------------
127 krb5 will automatically adapt its test suite to account for the configuration
128 of your system. Certain tests may require more installed packages to run. No
129 tests are expected to fail.
131 GOST engine test suite
134 Much like the PYCA/Cryptography test suite, this builds and runs the GOST engine
135 tests against the local OpenSSL build.
137 You will need a git checkout of gost-engine at the top level:
139 $ git submodule update --init
141 Then configure/build OpenSSL enabling external tests:
143 $ ./config shared enable-external-tests
146 GOST engine requires CMake for the build process.
148 GOST engine tests will then be run as part of the rest of the suite, or can be
149 explicitly run (with more debugging):
151 $ make test VERBOSE=1 TESTS=test_external_gost_engine
156 To update the commit for any of the above test suites:
158 - Make sure the submodules are cloned locally:
160 $ git submodule update --init --recursive
162 - Enter subdirectory and pull from the repository (use a specific branch/tag if required):
164 $ cd `<submodule-dir>`
165 $ git pull origin master
167 - Go to root directory, there should be a new git status:
172 # modified: `<submodule-dir>` (new commits)
175 - Add/commit/push the update
177 $ git add `<submodule-dir>`
178 $ git commit -m `"Updated <submodule> to latest commit"`