]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntp-genkeys improvements.
authorHarlan Stenn <stenn@ntp.org>
Mon, 18 Mar 2002 06:18:31 +0000 (01:18 -0500)
committerHarlan Stenn <stenn@ntp.org>
Mon, 18 Mar 2002 06:18:31 +0000 (01:18 -0500)
bk: 3c9586b7BkvXRBDUMxBSVzrLPGen5g

util/ntp-genkeys.c

index f767586250cf8ea5e0c9aa2e991cb4a19ce110ab..da024d2e01a03ff594fd8c3d5ca9cf06df5e2e2c 100644 (file)
@@ -752,7 +752,7 @@ genkeys(
                }
        }
        if (!gotsignkey && *f1_signkey) { /* Use sign key from ntp.conf */
-               cp = getpath(keysdir, f1_signkey, f2_signkey);
+               cp = getpath(keysdir, f1_signkey, NULL);
                if (!cp)
                        exit(-1);
                strcpy(f3_signkey, cp);
@@ -785,7 +785,7 @@ genkeys(
                }
        }
        if (!gotsignkey && *f1_privatekey) { /* Use rsakey from ntp.conf */
-               cp = getpath(keysdir, f1_privatekey, f2_privatekey);
+               cp = getpath(keysdir, f1_privatekey, NULL);
                if (!cp)
                        exit(-1);
                strcpy(f3_signkey, cp);
@@ -797,6 +797,9 @@ genkeys(
                if (debug > 1)
                        printf("f3: DR: <%s>\n", f3_signkey);
        }
+
+       if (!gotsignkey)
+               printf("No key found - no certs can be generated.\n");
 #endif /* OPENSSL */
 
        return (0);