changeset 38:011462bddcf1 tn5250

start tn5250 integration
author Carl Byington <carl@five-ten-sg.com>
date Tue, 10 Jun 2014 16:56:20 -0700
parents 0395ca628303
children 69bc44954bb5
files res/values/strings.xml src/org/tn5250j/framework/transport/SSL/SSLImplementation.java
diffstat 2 files changed, 17 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/res/values/strings.xml	Tue Jun 10 16:14:36 2014 -0700
+++ b/res/values/strings.xml	Tue Jun 10 16:56:20 2014 -0700
@@ -120,6 +120,14 @@
 	<string name="host_fingerprint">"Host %1$s key fingerprint is %2$s"</string>
 
     <!-- tn5250 strings -->
+	<string name="host_cert_version">"Version: "</string>
+	<string name="host_cert_serial">"Serial Number: "</string>
+	<string name="host_cert_algorithm">"Signature Algorithm: "</string>
+	<string name="host_cert_issuer">"Issuer: "</string>
+	<string name="host_cert_from">"Valid From: "</string>
+	<string name="host_cert_to">"Valid To: "</string>
+	<string name="host_cert_dn">"Subject DN: "</string>
+	<string name="host_cert_publickey">"Public Key: "</string>
 	<string name="host_certificate">"The certificate is %1$s"</string>
 	<string name="prompt_accept_certificate">"Unknown Certificate - Do you accept it?"</string>
 	<string name="prompt_save_certificate">"Do you want to save this certificate?"</string>
@@ -507,7 +515,7 @@
 	<string name="terminal_no_session">"Session will not be started due to host preference."</string>
 	<string name="terminal_enable_portfoward">"Enable port forward: %1$s"</string>
 
-	<string name="local_shell_unavailable">"Failure! Local shell is unavailable on this phone."</string>
+	<string name="local_shell_unavailable">"Failure! Local shell is unavailable on this device."</string>
 
 	<!-- Text sent to the user to alert them that a Terminal Bell is received in a background session -->
 	<string name="notification_text">"%1$s wants your attention."</string>
--- a/src/org/tn5250j/framework/transport/SSL/SSLImplementation.java	Tue Jun 10 16:14:36 2014 -0700
+++ b/src/org/tn5250j/framework/transport/SSL/SSLImplementation.java	Tue Jun 10 16:56:20 2014 -0700
@@ -172,21 +172,14 @@
 			return;
 		} catch (CertificateException ce) {
 			X509Certificate cert = chain[0];
-			String certInfo = "Version: " + cert.getVersion() + "\n";
-			certInfo = certInfo.concat("Serial Number: "
-					+ cert.getSerialNumber() + "\n");
-			certInfo = certInfo.concat("Signature Algorithm: "
-					+ cert.getSigAlgName() + "\n");
-			certInfo = certInfo.concat("Issuer: "
-					+ cert.getIssuerDN().getName() + "\n");
-			certInfo = certInfo.concat("Valid From: " + cert.getNotBefore()
-					+ "\n");
-			certInfo = certInfo
-					.concat("Valid To: " + cert.getNotAfter() + "\n");
-			certInfo = certInfo.concat("Subject DN: "
-					+ cert.getSubjectDN().getName() + "\n");
-			certInfo = certInfo.concat("Public Key: "
-					+ cert.getPublicKey().getFormat() + "\n");
+			String certInfo =          manager.res.getString(R.string.host_cert_version)   + cert.getVersion() + "\r\n";
+			certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_serial)    + cert.getSerialNumber() + "\r\n");
+			certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_algorithm) + cert.getSigAlgName() + "\r\n");
+			certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_issuer)    + cert.getIssuerDN().getName() + "\r\n");
+			certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_from)      + cert.getNotBefore() + "\r\n");
+			certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_to)        + cert.getNotAfter() + "\r\n");
+			certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_dn)        + cert.getSubjectDN().getName() + "\r\n");
+			certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_publickey) + cert.getPublicKey().getFormat() + "\r\n");
 
             bridge.outputLine(manager.res.getString(R.string.host_authenticity_warning, target));
             bridge.outputLine(manager.res.getString(R.string.host_certificate, certInfo));