Home / File/ RevocationServer.java — netty Source File

RevocationServer.java — netty Source File

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

Entity Profile

Relationship Graph

Source Code

/*
 * Copyright 2024 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.pkitesting;

import com.sun.net.httpserver.HttpServer;

import java.io.OutputStream;
import java.math.BigInteger;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.URI;
import java.security.Provider;
import java.security.cert.X509Certificate;
import java.time.Instant;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * A simple HTTP server that serves Certificate Revocation Lists.
 * <p>
 * Issuer certificates can be registered with the server, and revocations of their certificates and be published
 * and added to the revocation lists.
 * <p>
 * The server is only intended for testing usage, and runs entirely in a single thread.
 *
 * @implNote The CRLs will have the same very short life times, to minimize caching effects in tests.
 * This currently means the time in the "this update" and "next update" fields are set to the same value.
 */
public final class RevocationServer {
    private static volatile RevocationServer instance;

    private final HttpServer crlServer;
    private final String crlBaseAddress;
    private final AtomicInteger issuerCounter;
    private final ConcurrentMap<X509Certificate, CrlInfo> issuers;
    private final ConcurrentMap<String, CrlInfo> paths;

    /**
     * Get the shared revocation server instance.
     * This will start the server, if it isn't already running, and bind it to a random port on the loopback address.
     * @return The revocation server instance.
     * @throws Exception If the server failed to start.
     */
// ... (143 more lines)

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free