BouncyCastleUtil.java — netty Source File
Architecture documentation for BouncyCastleUtil.java, a java file in the netty codebase.
Entity Profile
Relationship Graph
Source Code
/*
* Copyright 2025 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.util;
import io.netty.util.internal.ThrowableUtil;
import io.netty.util.internal.logging.InternalLogger;
import io.netty.util.internal.logging.InternalLoggerFactory;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.Provider;
import java.security.Security;
import javax.net.ssl.SSLEngine;
/**
* Contains methods that can be used to detect if BouncyCastle is available.
*/
public final class BouncyCastleUtil {
private static final InternalLogger logger = InternalLoggerFactory.getInstance(BouncyCastleUtil.class);
private static final String BC_PROVIDER_NAME = "BC";
private static final String BC_PROVIDER = "org.bouncycastle.jce.provider.BouncyCastleProvider";
private static final String BC_FIPS_PROVIDER_NAME = "BCFIPS";
private static final String BC_FIPS_PROVIDER = "org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider";
private static final String BC_JSSE_PROVIDER_NAME = "BCJSSE";
private static final String BC_JSSE_PROVIDER = "org.bouncycastle.jsse.provider.BouncyCastleJsseProvider";
private static final String BC_PEMPARSER = "org.bouncycastle.openssl.PEMParser";
private static final String BC_JSSE_SSLENGINE = "org.bouncycastle.jsse.BCSSLEngine";
private static final String BC_JSSE_ALPN_SELECTOR = "org.bouncycastle.jsse.BCApplicationProtocolSelector";
private static volatile Throwable unavailabilityCauseBcProv;
private static volatile Throwable unavailabilityCauseBcPkix;
private static volatile Throwable unavailabilityCauseBcTls;
private static volatile Provider bcProviderJce;
private static volatile Provider bcProviderJsse;
private static volatile Class<? extends SSLEngine> bcSSLEngineClass;
private static volatile boolean attemptedLoading;
/**
* Indicate whether the BouncyCastle Java Crypto Extensions provider is available.
*/
public static boolean isBcProvAvailable() {
ensureLoaded();
return unavailabilityCauseBcProv == null;
}
/**
// ... (178 more lines)
Domain
Subdomains
Classes
Source
Frequently Asked Questions
What does BouncyCastleUtil.java do?
BouncyCastleUtil.java is a source file in the netty codebase, written in java. It belongs to the Buffer domain, Allocators subdomain.
Where is BouncyCastleUtil.java in the architecture?
BouncyCastleUtil.java is located at handler/src/main/java/io/netty/handler/ssl/util/BouncyCastleUtil.java (domain: Buffer, subdomain: Allocators, directory: handler/src/main/java/io/netty/handler/ssl/util).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free