From 30dc37a2ea1cc8de8ee64785a82da92939f307c8 Mon Sep 17 00:00:00 2001 From: Carie Pointer Date: Mon, 26 Aug 2019 15:32:09 -0700 Subject: [PATCH] Add SHA224 as an option for type in usage print statement and update hash type values to match the correct enum values found in types.h --- signature/README.md | 2 +- signature/signature.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/signature/README.md b/signature/README.md index a5ea72c7..92900309 100644 --- a/signature/README.md +++ b/signature/README.md @@ -2,7 +2,7 @@ This directory contains: -A simple example of using wolfSSL to sign and verify binary data. It supports RSA and ECC for signing and MD2, MD4, MD5, SHA, SHA256, SHA384 and SHA512. +A simple example of using wolfSSL to sign and verify binary data. It supports RSA and ECC for signing and MD2, MD4, MD5, SHA, SHA224, SHA256, SHA384 and SHA512. This example creates a signature from a hash of the file and signs it using a generated key. Then it performs a verification using the signature and public key. diff --git a/signature/signature.c b/signature/signature.c index 946c725d..8a523bca 100644 --- a/signature/signature.c +++ b/signature/signature.c @@ -425,7 +425,7 @@ int main(int argc, char** argv) if (argc < 2) { printf("Usage: signature \n"); printf(" : 1=ECC, 2=RSA, 3=RSA (w/DER Encoding): default %d\n", sig_type); - printf(" : 1=MD2, 2=MD4, 3=MD5, 4=SHA, 5=SHA256, 6=SHA384, 7=SHA512, 8=MD5+SHA: default %d\n", hash_type); + printf(" : 1=MD2, 2=MD4, 3=MD5, 4=SHA, 5=SHA224, 6=SHA256, 7=SHA384, 8=SHA512, 9=MD5+SHA: default %d\n", hash_type); printf(" : optional sig verify binary file\n"); return 1; }