diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-10-07 15:17:39 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2010-10-07 15:17:39 +0000 |
commit | fd6aba2c8925c9d156aec66686390fe124a61bff (patch) | |
tree | 85c5f4b8ada54632545bc4f93e4b7cc3ef09eb96 /usr.sbin | |
parent | ef93c654eac834fd282ce76a89d4d398fa8778dd (diff) |
only try to setup a passfile when creating a CA
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ikectl/ikeca.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ikectl/ikeca.c b/usr.sbin/ikectl/ikeca.c index 7aedd8496bc..616292866b6 100644 --- a/usr.sbin/ikectl/ikeca.c +++ b/usr.sbin/ikectl/ikeca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ikeca.c,v 1.13 2010/10/07 13:30:50 reyk Exp $ */ +/* $OpenBSD: ikeca.c,v 1.14 2010/10/07 15:17:38 jsg Exp $ */ /* $vantronix: ikeca.c,v 1.13 2010/06/03 15:52:52 reyk Exp $ */ /* @@ -770,7 +770,7 @@ ca_setup(char *caname, int create, int quiet, char *pass) if (mkdir(path, 0700) == -1 && errno != EEXIST) err(1, "failed to create dir %s", path); - if (stat(ca->passfile, &st) == -1 && errno == ENOENT) + if (create && stat(ca->passfile, &st) == -1 && errno == ENOENT) ca_newpass(ca->passfile, pass); arc4random_buf(rnd, sizeof(rnd)); |