Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
jsse.jar Source Code Files - OpenJDK 7u Release
Where Can I get source code files of jsse.jar?
✍: FYIcenter
You can get source code files of jsse.jar (JSSE) from OpenJDK GitHub Website in the src/share/classes/sun/security/ssl/ directory.
You can also browse JSSE Source Code files below:
⏎ sun/security/ssl/CipherSuiteList.java
/* * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package sun.security.ssl; import java.io.*; import java.util.*; import javax.net.ssl.SSLException; /** * A list of CipherSuites. Also maintains the lists of supported and * default ciphersuites and supports I/O from handshake streams. * * Instances of this class are immutable. * */ final class CipherSuiteList { private final Collection<CipherSuite> cipherSuites; private String[] suiteNames; // flag indicating whether this list contains any ECC ciphersuites. // null if not yet checked. private volatile Boolean containsEC; // for use by buildAvailableCache() and // Handshaker.getKickstartMessage() only CipherSuiteList(Collection<CipherSuite> cipherSuites) { this.cipherSuites = cipherSuites; } /** * Create a CipherSuiteList with a single element. */ CipherSuiteList(CipherSuite suite) { cipherSuites = new ArrayList<CipherSuite>(1); cipherSuites.add(suite); } /** * Construct a CipherSuiteList from a array of names. We don't bother * to eliminate duplicates. * * @exception IllegalArgumentException if the array or any of its elements * is null or if the ciphersuite name is unrecognized or unsupported * using currently installed providers. */ CipherSuiteList(String[] names) { if (names == null) { throw new IllegalArgumentException("CipherSuites may not be null"); } cipherSuites = new ArrayList<CipherSuite>(names.length); // refresh available cache once if a CipherSuite is not available // (maybe new JCE providers have been installed) boolean refreshed = false; for (int i = 0; i < names.length; i++) { String suiteName = names[i]; CipherSuite suite = CipherSuite.valueOf(suiteName); if (suite.isAvailable() == false) { if (refreshed == false) { // clear the cache so that the isAvailable() call below // does a full check clearAvailableCache(); refreshed = true; } // still missing? if (suite.isAvailable() == false) { throw new IllegalArgumentException("Cannot support " + suiteName + " with currently installed providers"); } } cipherSuites.add(suite); } } /** * Read a CipherSuiteList from a HandshakeInStream in V3 ClientHello * format. Does not check if the listed ciphersuites are known or * supported. */ CipherSuiteList(HandshakeInStream in) throws IOException { byte[] bytes = in.getBytes16(); if ((bytes.length & 1) != 0) { throw new SSLException("Invalid ClientHello message"); } cipherSuites = new ArrayList<CipherSuite>(bytes.length >> 1); for (int i = 0; i < bytes.length; i += 2) { cipherSuites.add(CipherSuite.valueOf(bytes[i], bytes[i+1])); } } /** * Return whether this list contains the given CipherSuite. */ boolean contains(CipherSuite suite) { return cipherSuites.contains(suite); } // Return whether this list contains any ECC ciphersuites boolean containsEC() { if (containsEC == null) { for (CipherSuite c : cipherSuites) { switch (c.keyExchange) { case K_ECDH_ECDSA: case K_ECDH_RSA: case K_ECDHE_ECDSA: case K_ECDHE_RSA: case K_ECDH_ANON: containsEC = true; return true; default: break; } } containsEC = false; } return containsEC; } /** * Return an Iterator for the CipherSuites in this list. */ Iterator<CipherSuite> iterator() { return cipherSuites.iterator(); } /** * Return a reference to the internal Collection of CipherSuites. * The Collection MUST NOT be modified. */ Collection<CipherSuite> collection() { return cipherSuites; } /** * Return the number of CipherSuites in this list. */ int size() { return cipherSuites.size(); } /** * Return an array with the names of the CipherSuites in this list. */ synchronized String[] toStringArray() { if (suiteNames == null) { suiteNames = new String[cipherSuites.size()]; int i = 0; for (CipherSuite c : cipherSuites) { suiteNames[i++] = c.name; } } return suiteNames.clone(); } public String toString() { return cipherSuites.toString(); } /** * Write this list to an HandshakeOutStream in V3 ClientHello format. */ void send(HandshakeOutStream s) throws IOException { byte[] suiteBytes = new byte[cipherSuites.size() * 2]; int i = 0; for (CipherSuite c : cipherSuites) { suiteBytes[i] = (byte)(c.id >> 8); suiteBytes[i+1] = (byte)c.id; i += 2; } s.putBytes16(suiteBytes); } /** * Clear cache of available ciphersuites. If we support all ciphers * internally, there is no need to clear the cache and calling this * method has no effect. */ static synchronized void clearAvailableCache() { if (CipherSuite.DYNAMIC_AVAILABILITY) { CipherSuite.BulkCipher.clearAvailableCache(); JsseJce.clearEcAvailable(); } } }
⏎ sun/security/ssl/CipherSuiteList.java
Or download all of them as a single archive file:
File name: sun-security-ssl-openjdk7u-fyi.zip File size: 277845 bytes Release date: 2012-05-03 Download
⇒ What Is jsse.jar (JDK 6) Java Secure Socket Extension
⇐ Downloading jsse.jar (JDK 7) Java Secure Socket Extension
2018-02-01, 6445👍, 0💬
Popular Posts:
JDK 11 jdk.rmic.jmod is the JMOD file for JDK 11 RMI (Remote Method Invocation) Compiler Tool tool, ...
How to display types defined in an XML Schema file with the xs\QueryXS.java provided in the Apache X...
What Is HttpComponents httpclient-4.2.2.jar? HttpComponents httpclient-4.2.2.jar is the JAR file for...
Apache Log4j 1.2 Bridge allows applications coded to use Log4j 1.2 API to use Log4j 2 instead. Bytec...
XML Serializer, Release 2.7.1, allows you to write out XML, HTML etc. as a stream of characters from...