External key provider for use with OpenSSL 3
Get series with b4
b4 am [email protected]...Versions newest first · linked by author and title
- v3 Latest18 patches 39 repliesIn review
- v19 patches 18 repliesSuperseded
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | A built-in provider for using external key with OpenSSL 3.0src/ src/ src/ | +215 | 2 replies | |
| 2/18 | Implement KEYMGMT in the xkey providersrc/ | +374 | 2 replies | |
| 3/18 | Implement SIGNATURE operations in xkey providersrc/ src/ | +566 | 2 replies | |
| 4/18 | Implement import of custom external keyssrc/ | +133 | 2 replies | |
| 5/18 | Initialize the xkey provider and use it in SSL contextsrc/ src/ src/ +5 more | +134 | 2 replies | |
| 6/18 | A helper function to import private key for management-external-keysrc/ src/ src/ +1 more | +129 | 2 replies | |
| 7/18 | Enable signing via provider for management-external-keysrc/ src/ src/ | +113 | 4 replies | |
| 8/18 | Add a function to encode digests with PKCS1 DigestInfo wrappersrc/ src/ | +150 | 2 replies | |
| 9/18 | Allow management client to announce pss padding supportdoc/ doc/ src/ +1 more | +34 | 2 replies | |
| 10/18 | Respect algorithm support announced by management clientsrc/ | +6 | 2 replies | |
| 11/18 | Support sending DigestSign request to management clientsrc/ src/ src/ | +45 | 2 replies | |
| 12/18 | Increase ERR_BUF_SIZE when management interface support is enabledsrc/ | +2 | 2 replies | |
| 13/18 | Add a generic key loading helper function for xkey providersrc/ src/ | +66 | 2 replies | |
| 14/18 | pkcs11: Interface the xkey provider with pkcs11-helpersrc/ src/ src/ | +154 | 2 replies | |
| 15/18 | Enable signing using CNG through xkey providersrc/ | +211 | 2 replies | |
| 16/18 | Add a unit test for external key providerconfigure.ac tests/ tests/ | +327 | 1 reply | |
| 17/18 | xkey-provider: Add a test for generic key load and signatureconfigure.ac tests/ tests/ | +105 | 6 replies | |
| 18/18 | Add xkey_provider sources and includes to MSVC projectsrc/ | +3 | 2 replies |
Reviews trailers per patch
All 18 patches have a Reviewed-by or Acked-by.
| Patch | Arne Schwabe |
|---|---|
| 1/18 | A-b |
| 2/18 | A-b |
| 3/18 | A-b |
| 4/18 | A-b |
| 5/18 | A-b |
| 6/18 | A-b |
| 7/18 | A-b |
| 8/18 | A-b |
| 9/18 | A-b |
| 10/18 | A-b |
| 11/18 | A-b |
| 12/18 | A-b |
| 13/18 | A-b |
| 14/18 | A-b |
| 15/18 | A-b |
| 16/18 | A-b |
| 17/18 | A-b |
| 18/18 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Openvpn-devel] [PATCH v3 00/18] External key provider for use with OpenSSL 3
From: Selva Nair <[email protected]...>
The following series of patches implement a built-in provider for interfacing OpenSSL 3.0 when external keys are in use.
Essentially, to intercept the sign operation, the SSL_CTX object has to be created with properties string set to prioritize our provider. In the provider we implement only keymgmt and signature operations and specify the property string as optional. That allows all operations we do not provide to be used from the default provider.
Same as PR#161 https://github.com/OpenVPN/openvpn/pull/161
with fixup commits in there squashed and rebased to master.
Requires OpenSSL 3.0.1 (released on Dec 14, 2021) or OpenSSL 3.0 or 3.1 dev branch post Oct 27.
Selva Nair (18):
A built-in provider for using external key with OpenSSL 3.0 Implement KEYMGMT in the xkey provider
Implement SIGNATURE operations in xkey provider Implement import of custom external keys
Initialize the xkey provider and use it in SSL context
A helper function to import private key for management-external-key Enable signing via provider for management-external-key Add a function to encode digests with PKCS1 DigestInfo wrapper Allow management client to announce pss padding support Respect algorithm support announced by management client Support sending DigestSign request to management client Increase ERR_BUF_SIZE when management interface support is enabled Add a generic key loading helper function for xkey provider
pkcs11: Interface the xkey provider with pkcs11-helper Enable signing using CNG through xkey provider
Add a unit test for external key provider
xkey-provider: Add a test for generic key load and signature Add xkey_provider sources and includes to MSVC project
doc/man-sections/management-options.rst | 8 +- doc/management-notes.txt | 22 +- src/openvpn/Makefile.am | 2 + src/openvpn/cryptoapi.c | 241 ++++- src/openvpn/error.h | 4 +- src/openvpn/manage.h | 2 + src/openvpn/openssl_compat.h | 8 + src/openvpn/openvpn.vcxproj | 3 + src/openvpn/options.c | 31 +- src/openvpn/options.h | 2 + src/openvpn/pkcs11_openssl.c | 151 +++ src/openvpn/ssl.c | 5 + src/openvpn/ssl.h | 6 + src/openvpn/ssl_mbedtls.c | 6 + src/openvpn/ssl_openssl.c | 108 +- src/openvpn/xkey_common.h | 158 +++ src/openvpn/xkey_helper.c | 393 +++++++ src/openvpn/xkey_provider.c | 1189 ++++++++++++++++++++++ tests/unit_tests/openvpn/Makefile.am | 16 + tests/unit_tests/openvpn/test_provider.c | 403 ++++++++ 20 files changed, 2715 insertions(+), 43 deletions(-) create mode 100644 src/openvpn/xkey_common.h create mode 100644 src/openvpn/xkey_helper.c create mode 100644 src/openvpn/xkey_provider.c create mode 100644 tests/unit_tests/openvpn/test_provider.c
Signature · 1 line
2.30.2