Home / File/ ExtendedOpenSslSession.java — netty Source File

ExtendedOpenSslSession.java — netty Source File

Architecture documentation for ExtendedOpenSslSession.java, a java file in the netty codebase.

Entity Profile

Relationship Graph

Source Code

/*
 * Copyright 2018 The Netty Project
 *
 * The Netty Project 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:
 *
 *   https://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 io.netty.handler.ssl;

import io.netty.util.internal.EmptyArrays;

import java.security.Principal;
import java.security.cert.Certificate;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.net.ssl.ExtendedSSLSession;
import javax.net.ssl.SNIServerName;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLPeerUnverifiedException;
import javax.net.ssl.SSLSessionBindingEvent;
import javax.net.ssl.SSLSessionBindingListener;
import javax.security.cert.X509Certificate;

/**
 * Delegates all operations to a wrapped {@link OpenSslInternalSession} except the methods defined by
 * {@link ExtendedSSLSession} itself.
 */
abstract class ExtendedOpenSslSession extends ExtendedSSLSession implements OpenSslInternalSession {

    // TODO: use OpenSSL API to actually fetch the real data but for now just do what Conscrypt does:
    // https://github.com/google/conscrypt/blob/1.2.0/common/
    // src/main/java/org/conscrypt/Java7ExtendedSSLSession.java#L32
    private static final String[] LOCAL_SUPPORTED_SIGNATURE_ALGORITHMS = {
            "SHA512withRSA", "SHA512withECDSA", "SHA384withRSA", "SHA384withECDSA", "SHA256withRSA",
            "SHA256withECDSA", "SHA224withRSA", "SHA224withECDSA", "SHA1withRSA", "SHA1withECDSA",
            "RSASSA-PSS",
    };

    private final OpenSslInternalSession wrapped;

    ExtendedOpenSslSession(OpenSslInternalSession wrapped) {
        this.wrapped = wrapped;
    }

    @Override
    public abstract List<SNIServerName> getRequestedServerNames();

    // Do not mark as override so we can compile on java8.
    public List<byte[]> getStatusResponses() {
        // Just return an empty list for now until we support it as otherwise we will fail in java9
        // because of their sun.security.ssl.X509TrustManagerImpl class.
// ... (211 more lines)

Domain

Subdomains

Frequently Asked Questions

What does ExtendedOpenSslSession.java do?
ExtendedOpenSslSession.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is ExtendedOpenSslSession.java in the architecture?
ExtendedOpenSslSession.java is located at handler/src/main/java/io/netty/handler/ssl/ExtendedOpenSslSession.java (domain: Buffer, subdomain: Allocators, directory: handler/src/main/java/io/netty/handler/ssl).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free