summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhalex <halex@openbsd.org>2015-07-18 23:23:20 +0000
committerhalex <halex@openbsd.org>2015-07-18 23:23:20 +0000
commit4c688d0df9f63f4b144464a48de1dda833278c5c (patch)
tree9657c539cecc80fbc3a4612916cbb32185f72de1
parentpf_send_tcp() should also use unhandled_af() (diff)
downloadwireguard-openbsd-4c688d0df9f63f4b144464a48de1dda833278c5c.tar.xz
wireguard-openbsd-4c688d0df9f63f4b144464a48de1dda833278c5c.zip
remove the restriction to disallow the use of a passphrase file during
initial creation of a crypto volume ok phessler
-rw-r--r--sbin/bioctl/bioctl.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sbin/bioctl/bioctl.c b/sbin/bioctl/bioctl.c
index 7e53d6b3b88..b85a25a3624 100644
--- a/sbin/bioctl/bioctl.c
+++ b/sbin/bioctl/bioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bioctl.c,v 1.128 2015/05/30 06:24:59 jmc Exp $ */
+/* $OpenBSD: bioctl.c,v 1.129 2015/07/18 23:23:20 halex Exp $ */
/*
* Copyright (c) 2004, 2005 Marco Peereboom
@@ -1276,9 +1276,6 @@ derive_key_pkcs(int rounds, u_int8_t *key, size_t keysz, u_int8_t *salt,
errx(1, "Too few rounds: %d", rounds);
/* get passphrase */
- if (password && verify)
- errx(1, "can't specify passphrase file during initial "
- "creation of crypto volume");
if (password) {
if ((f = fopen(password, "r")) == NULL)
err(1, "invalid passphrase file");
@@ -1305,7 +1302,7 @@ derive_key_pkcs(int rounds, u_int8_t *key, size_t keysz, u_int8_t *salt,
errx(1, "unable to read passphrase");
}
- if (verify) {
+ if (verify && !password) {
/* request user to re-type it */
if (readpassphrase("Re-type passphrase: ", verifybuf,
sizeof(verifybuf), rpp_flag) == NULL) {