summaryrefslogtreecommitdiffstats
path: root/src/tests/rsa_test.c
Commit message (Collapse)AuthorAgeFilesLines
* [test] Generalise public-key algorithm tests and use okx()Michael Brown2024-08-191-170/+19Star
| | | | | | | | Generalise the existing support for performing RSA public-key encryption, decryption, signature, and verification tests, and update the code to use okx() for neater reporting of test results. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Pass asymmetric keys as ASN.1 cursorsMichael Brown2024-08-181-37/+31Star
| | | | | | | | | | | Asymmetric keys are invariably encountered within ASN.1 structures such as X.509 certificates, and the various large integers within an RSA key are themselves encoded using ASN.1. Simplify all code handling asymmetric keys by passing keys as a single ASN.1 cursor, rather than separate data and length pointers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Add support for PKCS#8 private key formatMichael Brown2023-06-021-1/+59
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Ensure that test code drags in required ASN.1 object identifiersMichael Brown2020-06-171-12/+13
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add missing #include <string.h>Michael Brown2016-03-121-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | Relicense files for which I am the sole author (as identified by util/relicense.pl). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-201-1/+2
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add self-tests for RSAMichael Brown2012-03-181-0/+491
Add self-tests for the RSA algorithm using test vectors generated with the openssl tools. Signed-off-by: Michael Brown <mcb30@ipxe.org>