ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/tomcat/util/net/SSLUtil.java

Path
ttomcat-1778514358873.zip-extract/apache-tomcat-11.0.18-src/java/org/apache/tomcat/util/net/SSLUtil.java
Status
scanned
Type
file
Name
SSLUtil.java
Extension
.java
Programming language
Java
Mime type
text/plain
File type
ASCII text, with CRLF line terminators
Tag

      
    
Rootfs path

      
    
Size
4130 (4.0 KB)
MD5
7be7ef8028be9e5026199c26cea79e8a
SHA1
ac1b7af40550fcc8a6a52427c0fafb6d0d75aab1
SHA256
28ba99c735315c26c73e23a250721762ee5fe72c73ff3ed3e9198e9d0984fcce
SHA512

      
    
SHA1_git
025845db77c35b1fdf11bd240690cbb4e8662669
Is binary

      
    
Is text
True
Is archive

      
    
Is media

      
    
Is legal

      
    
Is manifest

      
    
Is readme

      
    
Is top level

      
    
Is key file

      
    
SSLUtil.java | 4.0 KB |

/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tomcat.util.net; import java.util.List; import javax.net.ssl.KeyManager; import javax.net.ssl.SSLSessionContext; import javax.net.ssl.TrustManager; import javax.net.ssl.X509KeyManager; import javax.net.ssl.X509TrustManager; /** * Provides a common interface for {@link SSLImplementation}s to create the necessary JSSE implementation objects for * TLS connections created via the JSSE API. */ public interface SSLUtil { /** * Creates an instance of Tomcat's {@code SSLContext} from the provided inputs. Typically used when the user wants * to provide a pre-configured {@code javax.net.ssl.SSLContext} instance. There is no need to call * {@link SSLContext#init(KeyManager[], TrustManager[], java.security.SecureRandom)} on the returned value. * * @param sslContext The JSSE SSL context * @param keyManager The JSSE key manager * @param trustManager The JSSE trust manager * * @return An instance of Tomcat's {@code SSLContext} formed from the provided inputs. */ static SSLContext createSSLContext(javax.net.ssl.SSLContext sslContext, X509KeyManager keyManager, X509TrustManager trustManager) { return new SSLContextWrapper(sslContext, keyManager, trustManager); } SSLContext createSSLContext(List<String> negotiableProtocols) throws Exception; KeyManager[] getKeyManagers() throws Exception; TrustManager[] getTrustManagers() throws Exception; void configureSessionContext(SSLSessionContext sslSessionContext); /** * The set of enabled protocols is the intersection of the implemented protocols and the configured protocols. If no * protocols are explicitly configured, then all of the implemented protocols will be included in the returned * array. * * @return The protocols currently enabled and available for clients to select from for the associated connection * * @throws IllegalArgumentException If there is no intersection between the implemented and configured protocols */ String[] getEnabledProtocols() throws IllegalArgumentException; /** * The set of enabled ciphers is the intersection of the implemented ciphers and the configured ciphers. If no * ciphers are explicitly configured, then the default ciphers will be included in the returned array. * <p> * The ciphers used during the TLS handshake may be further restricted by the {@link #getEnabledProtocols()} and the * certificates. * * @return The ciphers currently enabled and available for clients to select from for the associated connection * * @throws IllegalArgumentException If there is no intersection between the implemented and configured ciphers */ String[] getEnabledCiphers() throws IllegalArgumentException; /** * Optional interface that can be implemented by {@link javax.net.ssl.SSLEngine}s to indicate that they support ALPN * and can provide the protocol agreed with the client. */ interface ProtocolInfo { /** * ALPN information. * * @return the protocol selected using ALPN */ String getNegotiatedProtocol(); } }
Detected license expression
apache-2.0
Detected license expression (SPDX)
Apache-2.0
Percentage of license text
24.59
Copyrights

      
    
Holders

      
    
Authors

      
    
License detections License expression License expression SPDX
apache_2_0-4bde3f57-78aa-4201-96bf-531cba09e7de apache-2.0 Apache-2.0
URL Start line End line
http://www.apache.org/licenses/LICENSE-2.0 9 9