From d5e1990d2ff5ca597afa32159e4bd52de2dfc13b Mon Sep 17 00:00:00 2001 From: Takuo Kitame Date: Thu, 1 Jul 2010 14:16:17 +0900 Subject: Fix merge fail --- .../VpnServices/src/com/android/server/vpn/OpenvpnService.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/VpnServices/src/com/android/server/vpn/OpenvpnService.java b/packages/VpnServices/src/com/android/server/vpn/OpenvpnService.java index c0df60c..1a5008f 100644 --- a/packages/VpnServices/src/com/android/server/vpn/OpenvpnService.java +++ b/packages/VpnServices/src/com/android/server/vpn/OpenvpnService.java @@ -66,9 +66,13 @@ class OpenvpnService extends VpnService { args.add("--proto"); args.add(p.getProto()); args.add("--client"); args.add("--rport"); args.add(p.getPort()); - args.add("--ca"); args.add(USE_INLINE); args.add(USE_KEYSTORE + Credentials.CA_CERTIFICATE + p.getCAName()); - args.add("--cert"); args.add(USE_INLINE); args.add(USE_KEYSTORE + Credentials.USER_CERTIFICATE + p.getCertName()); - args.add("--key"); args.add(USE_INLINE); args.add(USE_KEYSTORE + Credentials.USER_PRIVATE_KEY + p.getCertName()); + if (p.getCAName() != null) { + args.add("--ca"); args.add(USE_INLINE); args.add(USE_KEYSTORE + Credentials.CA_CERTIFICATE + p.getCAName()); + } + if (p.getCertName() != null) { + args.add("--cert"); args.add(USE_INLINE); args.add(USE_KEYSTORE + Credentials.USER_CERTIFICATE + p.getCertName()); + args.add("--key"); args.add(USE_INLINE); args.add(USE_KEYSTORE + Credentials.USER_PRIVATE_KEY + p.getCertName()); + } args.add("--persist-tun"); args.add("--persist-key"); args.add("--management"); args.add("/dev/socket/" + socketName); args.add("unix"); -- cgit v1.1