fix accidental swapping of public vs private key comment
authorFelix Fietkau <nbd@openwrt.org>
Thu, 17 Dec 2015 16:06:27 +0000 (17:06 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 17 Dec 2015 16:06:27 +0000 (17:06 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
main.c

diff --git a/main.c b/main.c
index 869ee0875ca919df1b4ae80bde2ecaecd80a912e..2203d0185611f6b4a9b13358f47c9c81cbabc7d0 100644 (file)
--- a/main.c
+++ b/main.c
@@ -312,7 +312,7 @@ static int generate(void)
        if (b64_encode(&skey, sizeof(skey), buf, sizeof(buf)) < 0)
                return 1;
 
-       write_file(seckeyfile, skey.fingerprint, "public key", buf);
+       write_file(seckeyfile, skey.fingerprint, "private key", buf);
 
        memcpy(pkey.fingerprint, skey.fingerprint, sizeof(pkey.fingerprint));
        memcpy(pkey.pubkey, skey.seckey + 32, sizeof(pkey.pubkey));
@@ -320,7 +320,7 @@ static int generate(void)
        if (b64_encode(&pkey, sizeof(pkey), buf, sizeof(buf)) < 0)
                return 1;
 
-       write_file(pubkeyfile, pkey.fingerprint, "private key", buf);
+       write_file(pubkeyfile, pkey.fingerprint, "public key", buf);
 
        return 0;
 }