diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
commit | b51469b41167fb86ae2059a15cf0475c53fdda7b (patch) | |
tree | fc85d6ca2efd89c67e1e4e7438f437c3e08313f4 /java/src/IceSSL/Util.java | |
parent | Fixed (ICE-5695) - IceSSL: misleading exception (diff) | |
download | ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.bz2 ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.xz ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.zip |
Down with ant. From the gradle to the grave.
Diffstat (limited to 'java/src/IceSSL/Util.java')
-rw-r--r-- | java/src/IceSSL/Util.java | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/java/src/IceSSL/Util.java b/java/src/IceSSL/Util.java deleted file mode 100644 index 1d948d62df4..00000000000 --- a/java/src/IceSSL/Util.java +++ /dev/null @@ -1,72 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package IceSSL; - -public final class Util -{ - // - // Create a certificate from a PEM-encoded string. - // - public static java.security.cert.X509Certificate - createCertificate(String certPEM) - throws java.security.cert.CertificateException - { - final String header = "-----BEGIN CERTIFICATE-----"; - final String footer = "-----END CERTIFICATE-----"; - - // - // The generateCertificate method requires that its input begin - // with the PEM header. - // - int pos = certPEM.indexOf(header); - if(pos == -1) - { - certPEM = header + "\n" + certPEM; - } - else if(pos > 0) - { - certPEM = certPEM.substring(pos); - } - - // - // Add the footer if necessary. - // - if(certPEM.indexOf(footer) == -1) - { - certPEM = certPEM + footer; - } - - byte[] bytes = null; - try - { - bytes = certPEM.getBytes("UTF8"); - } - catch(java.io.UnsupportedEncodingException ex) - { - assert(false); - return null; - } - - java.io.ByteArrayInputStream in = new java.io.ByteArrayInputStream(bytes); - java.security.cert.CertificateFactory cf = java.security.cert.CertificateFactory.getInstance("X.509"); - return (java.security.cert.X509Certificate)cf.generateCertificate(in); - } - - public final static String jdkTarget = "1.5"; - - // - // Needed by the test scripts to determine the JDK target of the SSL plug-in. - // - public static void - main(String[] args) - { - System.out.println(jdkTarget); - } -} |