Add support for all SHA modes in cert_write
Add support for `MBEDTLS_SHA_224` and `MBEDTLS_SHA_384` in `cert_write`, to support generating such certificates in `tests/data_files/Makefile`.
This commit is contained in:
parent
9eeb8611b1
commit
991a05b411
@ -725,7 +725,7 @@
|
||||
"iEM9wW7hEMkwmk0h/sqZsrJsGH5YsF/VThSq/JVO1e2mZH2vruyZKJVBq+8tDNYp\r\n" \
|
||||
"HkK6tSyVYQhzIt3StMJWKMl/o5k2AYz6tSC164+1oG+ML3LWg8XrGKa91H4UOKap\r\n" \
|
||||
"Awgk0+4m0T25cNs=\r\n" \
|
||||
"-----END CERTIFICATE-----\r\n";
|
||||
"-----END CERTIFICATE-----\r\n"
|
||||
/* END FILE */
|
||||
|
||||
/* This is taken from tests/data_files/server2.crt.der. */
|
||||
|
@ -357,8 +357,12 @@ int main( int argc, char *argv[] )
|
||||
{
|
||||
if( strcmp( q, "SHA1" ) == 0 )
|
||||
opt.md = MBEDTLS_MD_SHA1;
|
||||
else if( strcmp( q, "SHA224" ) == 0 )
|
||||
opt.md = MBEDTLS_MD_SHA224;
|
||||
else if( strcmp( q, "SHA256" ) == 0 )
|
||||
opt.md = MBEDTLS_MD_SHA256;
|
||||
else if( strcmp( q, "SHA384" ) == 0 )
|
||||
opt.md = MBEDTLS_MD_SHA384;
|
||||
else if( strcmp( q, "SHA512" ) == 0 )
|
||||
opt.md = MBEDTLS_MD_SHA512;
|
||||
else if( strcmp( q, "MD2" ) == 0 )
|
||||
|
Loading…
Reference in New Issue
Block a user