From 56889cd25ff1762fca0e30d99eab0a572dbc2fab Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 3 Jul 2013 14:10:59 +0200 Subject: Restructure global settings --HG-- extra : amend_source : 1b4e0ac86c557993b0195c4b1bad968f3f27aac1 --- src/de/blinkt/openvpn/core/X509Utils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/de/blinkt/openvpn/core/X509Utils.java') diff --git a/src/de/blinkt/openvpn/core/X509Utils.java b/src/de/blinkt/openvpn/core/X509Utils.java index b533c886..4d2e6668 100644 --- a/src/de/blinkt/openvpn/core/X509Utils.java +++ b/src/de/blinkt/openvpn/core/X509Utils.java @@ -1,6 +1,9 @@ package de.blinkt.openvpn.core; +import android.content.Context; import android.text.TextUtils; + +import de.blinkt.openvpn.R; import de.blinkt.openvpn.VpnProfile; import org.spongycastle.util.io.pem.PemObject; import org.spongycastle.util.io.pem.PemReader; @@ -52,7 +55,7 @@ public class X509Utils { - public static String getCertificateFriendlyName (String filename) { + public static String getCertificateFriendlyName (Context c, String filename) { if(!TextUtils.isEmpty(filename)) { try { X509Certificate cert = (X509Certificate) getCertificateFromFile(filename); @@ -63,7 +66,7 @@ public class X509Utils { OpenVPN.logError("Could not read certificate" + e.getLocalizedMessage()); } } - return "Cannot display certificate information"; + return c.getString(R.string.cannotparsecert); } public static String getCertificateFriendlyName(X509Certificate cert) { -- cgit v1.2.3