diff src/org/tn5250j/framework/transport/SSL/SSLImplementation.java @ 38:011462bddcf1 tn5250

start tn5250 integration
author Carl Byington <carl@five-ten-sg.com>
date Tue, 10 Jun 2014 16:56:20 -0700
parents 9ae1c889a64c
children 8f23b05a51f7
line wrap: on
line diff
--- 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));