microsoft / go-crypto-openssl

Go crypto backend for Linux using OpenSSL
MIT License
61 stars 15 forks source link

all: increase test coverage #3

Closed qmuntal closed 2 years ago

qmuntal commented 2 years ago

This PR increases the test coverage from ~30% to ~75%.

The new tests are mostly about calling OpenSSL functions and checking that there are no errors, that nothing panics, and, when possible, that encrypt/decrypt and sign/verify functions can roundtrip correctly.

This tests will help a lot on ensuring that there are no regressions in our OpenSSL support matrix once the CI is in place.

It is out of the scope of this PR, and probably from this repo, to ensure the cryptographic correctness for the exposed functions. This validation is not trivial is is very tied to how this package is integrated with the Go toolchain.