Just a quick patch which fixes  --management-external-key, which I need
for a cleaner way to access Android key store.

Arne
>From 53c5018f953764221c0aa51daa8bfa74f146900f Mon Sep 17 00:00:00 2001
From: Arne Schwabe <a...@rfc2549.org>
List-Post: openvpn-devel@lists.sourceforge.net
Date: Thu, 28 Jun 2012 19:41:09 +0200
Subject: [PATCH] If --management-external-key is used do not check for
 private key file existence

Fixes error:  --key fails with EXTERNAL_PRIVATE_KEY: No such file or directory 
if  --management-external-key is used

Signed-off-by: Arne Schwabe <a...@rfc2549.org>
---
 src/openvpn/options.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/openvpn/options.c b/src/openvpn/options.c
index 367c1bc..a5f323d 100644
--- a/src/openvpn/options.c
+++ b/src/openvpn/options.c
@@ -2709,6 +2709,9 @@ options_postprocess_filechecks (struct options *options)
   errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, options->cert_file, 
R_OK, "--cert");
   errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, 
options->extra_certs_file, R_OK,
                              "--extra-certs");
+#ifdef MANAGMENT_EXTERNAL_KEY
+       if(!(options->management_flags | MF_EXTERNAL_KEY))
+#endif
   errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, 
options->priv_key_file, R_OK,
                              "--key");
   errs |= check_file_access (CHKACC_FILE|CHKACC_INLINE, options->pkcs12_file, 
R_OK,
-- 
1.7.7.5 (Apple Git-26)

Reply via email to