From 6d89ede657243804ff9014141f9500312256cd6b Mon Sep 17 00:00:00 2001 From: james Date: Tue, 13 Dec 2005 19:41:07 +0000 Subject: Don't warn user if he uses user/group/chroot and did not specify persist-key but uses PKCS#11. svn merge -r 847:848 https://svn.openvpn.net/projects/openvpn/contrib/alon/BETA21/openvpn . git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@853 e7ae566f-a301-0410-adde-c780ea21d3b5 --- init.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'init.c') diff --git a/init.c b/init.c index c90cb5d..24f1a7f 100644 --- a/init.c +++ b/init.c @@ -1674,8 +1674,13 @@ do_option_warnings (struct context *c) if (o->ping_send_timeout && !o->ping_rec_timeout) msg (M_WARN, "WARNING: --ping should normally be used with --ping-restart or --ping-exit"); - if ((o->username || o->groupname || o->chroot_dir) && (!o->persist_tun || !o->persist_key)) - msg (M_WARN, "WARNING: you are using user/group/chroot without persist-key/persist-tun -- this may cause restarts to fail"); + if (o->username || o->groupname || o->chroot_dir) + { + if (!o->persist_tun) + msg (M_WARN, "WARNING: you are using user/group/chroot without persist-tun -- this may cause restarts to fail"); + if (!o->persist_key && !o->pkcs11_id) + msg (M_WARN, "WARNING: you are using user/group/chroot without persist-key -- this may cause restarts to fail"); + } #if P2MP if (o->pull && o->ifconfig_local && c->first_time) -- cgit