Mercurial > 510Connectbot
comparison 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 |
comparison
equal
deleted
inserted
replaced
37:0395ca628303 | 38:011462bddcf1 |
---|---|
170 } | 170 } |
171 } | 171 } |
172 return; | 172 return; |
173 } catch (CertificateException ce) { | 173 } catch (CertificateException ce) { |
174 X509Certificate cert = chain[0]; | 174 X509Certificate cert = chain[0]; |
175 String certInfo = "Version: " + cert.getVersion() + "\n"; | 175 String certInfo = manager.res.getString(R.string.host_cert_version) + cert.getVersion() + "\r\n"; |
176 certInfo = certInfo.concat("Serial Number: " | 176 certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_serial) + cert.getSerialNumber() + "\r\n"); |
177 + cert.getSerialNumber() + "\n"); | 177 certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_algorithm) + cert.getSigAlgName() + "\r\n"); |
178 certInfo = certInfo.concat("Signature Algorithm: " | 178 certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_issuer) + cert.getIssuerDN().getName() + "\r\n"); |
179 + cert.getSigAlgName() + "\n"); | 179 certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_from) + cert.getNotBefore() + "\r\n"); |
180 certInfo = certInfo.concat("Issuer: " | 180 certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_to) + cert.getNotAfter() + "\r\n"); |
181 + cert.getIssuerDN().getName() + "\n"); | 181 certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_dn) + cert.getSubjectDN().getName() + "\r\n"); |
182 certInfo = certInfo.concat("Valid From: " + cert.getNotBefore() | 182 certInfo = certInfo.concat(manager.res.getString(R.string.host_cert_publickey) + cert.getPublicKey().getFormat() + "\r\n"); |
183 + "\n"); | |
184 certInfo = certInfo | |
185 .concat("Valid To: " + cert.getNotAfter() + "\n"); | |
186 certInfo = certInfo.concat("Subject DN: " | |
187 + cert.getSubjectDN().getName() + "\n"); | |
188 certInfo = certInfo.concat("Public Key: " | |
189 + cert.getPublicKey().getFormat() + "\n"); | |
190 | 183 |
191 bridge.outputLine(manager.res.getString(R.string.host_authenticity_warning, target)); | 184 bridge.outputLine(manager.res.getString(R.string.host_authenticity_warning, target)); |
192 bridge.outputLine(manager.res.getString(R.string.host_certificate, certInfo)); | 185 bridge.outputLine(manager.res.getString(R.string.host_certificate, certInfo)); |
193 Boolean result = bridge.promptHelper.requestBooleanPrompt(null, manager.res.getString(R.string.prompt_accept_certificate)); | 186 Boolean result = bridge.promptHelper.requestBooleanPrompt(null, manager.res.getString(R.string.prompt_accept_certificate)); |
194 if ((result == null) || (!result.booleanValue())) { | 187 if ((result == null) || (!result.booleanValue())) { |