Add suppport for MD2 to CSR and CRT writing example programs
The example programs programs/x509/cert_req and programs/x509/cert_write
(demonstrating the use of X.509 CSR and CRT writing functionality)
previously didn't support MD2 signatures.
For testing purposes, this commit adds support for MD2 to cert_req,
and support for MD2 and MD4 to cert_write.
diff --git a/programs/x509/cert_write.c b/programs/x509/cert_write.c
index cd39108..8579831 100644
--- a/programs/x509/cert_write.c
+++ b/programs/x509/cert_write.c
@@ -372,6 +372,10 @@
opt.md = MBEDTLS_MD_SHA256;
else if( strcmp( q, "SHA512" ) == 0 )
opt.md = MBEDTLS_MD_SHA512;
+ else if( strcmp( q, "MD2" ) == 0 )
+ opt.md = MBEDTLS_MD_MD2;
+ else if( strcmp( q, "MD4" ) == 0 )
+ opt.md = MBEDTLS_MD_MD4;
else if( strcmp( q, "MD5" ) == 0 )
opt.md = MBEDTLS_MD_MD5;
else