From: Niels Möller Date: Tue, 16 Jan 2018 21:49:37 +0000 (+0100) Subject: tools/pkcs1-conv.c: Add missing break statements. X-Git-Tag: nettle_3.5rc1~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20c7ba59e2cb54f1bec7d679dbdbe00c42bdd190;p=thirdparty%2Fnettle.git tools/pkcs1-conv.c: Add missing break statements. --- diff --git a/ChangeLog b/ChangeLog index f31a3017..081faae3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2018-01-16 Niels Möller + + * tools/pkcs1-conv.c (convert_file): Add missing break statements. + 2018-01-09 Niels Möller * testsuite/testutils.c (test_cipher_ctr): Test operations with diff --git a/tools/pkcs1-conv.c b/tools/pkcs1-conv.c index efd6528a..f6b044d2 100644 --- a/tools/pkcs1-conv.c +++ b/tools/pkcs1-conv.c @@ -563,28 +563,20 @@ convert_file(struct nettle_buffer *buffer, { case 10: if (memcmp(marker, "PUBLIC KEY", 10) == 0) - { - type = GENERAL_PUBLIC_KEY; - break; - } + type = GENERAL_PUBLIC_KEY; + break; + case 14: if (memcmp(marker, "RSA PUBLIC KEY", 14) == 0) - { - type = RSA_PUBLIC_KEY; - break; - } + type = RSA_PUBLIC_KEY; + break; case 15: if (memcmp(marker, "RSA PRIVATE KEY", 15) == 0) - { - type = RSA_PRIVATE_KEY; - break; - } - if (memcmp(marker, "DSA PRIVATE KEY", 15) == 0) - { - type = DSA_PRIVATE_KEY; - break; - } + type = RSA_PRIVATE_KEY; + else if (memcmp(marker, "DSA PRIVATE KEY", 15) == 0) + type = DSA_PRIVATE_KEY; + break; } if (!type)