Skip to content

Commit

Permalink
Add support for all SHA modes in cert_write
Browse files Browse the repository at this point in the history
Add support for `MBEDTLS_SHA_224` and `MBEDTLS_SHA_384` in
`cert_write`, to support generating such certificates in
`tests/data_files/Makefile`.
  • Loading branch information
Ron Eldor authored and Ron Eldor committed Jul 10, 2019
1 parent 9eeb861 commit 2561a0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions programs/x509/cert_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down

0 comments on commit 2561a0c

Please sign in to comment.