Skip to content

Add some tests for cryptoapi.c functions

[email protected]... openvpn-devel 1 version In review

Get series with b4
b4 am [email protected]...

Versions newest first

  1. v1 Latest4 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Import some sample certificates into Windows store for testingtests/unit_tests/openvpn/cert_data.h tests/unit_tests/openvpn/test_cryptoapi.c+324 -23 replies
2/4Add tests for finding certificates in Windows cert storetests/unit_tests/openvpn/test_cryptoapi.c+102 -01 reply
3/4Refactor SSL_CTX_use_CryptoAPI_certificate()src/openvpn/cryptoapi.c+41 -221 reply
4/4Add a test for signing with certificates in Windows storetests/unit_tests/openvpn/Makefile.am tests/unit_tests/openvpn/test_cryptoapi.c+167 -01 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchGert Doering
1/4A-b
2/4A-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [Openvpn-devel] [PATCH 0/4] Add some tests for cryptoapi.c functions

From: Selva Nair <[email protected]...>

Import some sample certificates into Windows store for testing
- 4 test certificates&keys imported to user store and removed at the end.

Add tests for finding certificates in Windows certficate store
- test using SUBJ:, THUMB: and ISSUER: select-strings

Refactor SSL_CTX_use_CryptoAPI_certificate()
- A minor reorganization avoids wrapping for the next test

Add a test for signing with certificates in Windows store
- Test loading keys into xkey-provider and sign a test message. The signature is then verified using OpenSSL.

Sample output the test runs:
https://github.com/selvanair/openvpn/actions/runs/4418774866/jobs/7746404938#step:8:1

 src/openvpn/cryptoapi.c                   |  63 ++--
 tests/unit_tests/openvpn/Makefile.am      |   1 +
 tests/unit_tests/openvpn/cert_data.h      | 166 +++++++++
 tests/unit_tests/openvpn/test_cryptoapi.c | 429 +++++++++++++++++++++-
 4 files changed, 635 insertions(+), 24 deletions(-)
 create mode 100644 tests/unit_tests/openvpn/cert_data.h
Signature · 1 line
2.34.1