wolfProvider
wolfProvider copied to clipboard
rsa pki encoding/decoding tests and fix for encoding rsapss to pki
This mainly contains testing for encoding / decoding RSA and RSASSA-PSS keys to / from pki.
Found some bugs and fixed them:
- RSASSA-PSS key params are not encoded to DER when using pki encoding. Copied some code from the spki encoding section for a fix (altered it slightly for different offsets).
- WolfProvider returns digest names that do not match those of OSSL. Made a mapping function based on a wolfcrypt enum.
Addendum:
- When doing the encoding test the created der was then decoded with ossl and wp. Changed
test_rsa_decode_pkcs8_evp_pkeyto allow decoding ctx to be specified. Now decoding can be done with ossl and wp, or just ossl.