]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
tools/pkcs1-conv.c: Add missing break statements.
authorNiels Möller <nisse@lysator.liu.se>
Tue, 16 Jan 2018 21:49:37 +0000 (22:49 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Sun, 18 Nov 2018 10:24:44 +0000 (11:24 +0100)
(cherry picked from commit 20c7ba59e2cb54f1bec7d679dbdbe00c42bdd190)

ChangeLog
tools/pkcs1-conv.c

index 78ebd75a2b6a6e57333f18ac721328c3810c45a7..b01c8b4d9dbeb92d3c4a9b07742a8df171c5ef62 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-01-16  Niels Möller  <nisse@lysator.liu.se>
+
+       Backported from master branch.
+       * tools/pkcs1-conv.c (convert_file): Add missing break statements.
+
 2018-10-10  Niels Möller  <nisse@lysator.liu.se>
 
        Backported from master branch.
index efd6528a4ab4401f73a30f48603752723cc5ef32..f6b044d22bc9d7f98fc370e9e13d2f69014e1a27 100644 (file)
@@ -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)