ReferenceCountedOpenSslEngine() — netty Function Reference
Architecture documentation for the ReferenceCountedOpenSslEngine() function in ReferenceCountedOpenSslEngine.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 597187e9_65f2_df9a_22e3_c3e7eb0f231a["ReferenceCountedOpenSslEngine()"] df1ad81e_e5bf_85e6_4418_db301b4c3e66["ReferenceCountedOpenSslEngine"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|defined in| df1ad81e_e5bf_85e6_4418_db301b4c3e66 c4b3e9d1_8ba5_707f_4649_4d5a628a2433["shutdown()"] c4b3e9d1_8ba5_707f_4649_4d5a628a2433 -->|calls| 597187e9_65f2_df9a_22e3_c3e7eb0f231a 7db95b56_7d68_6c82_5d8a_8cc4d6d4156c["DefaultOpenSslSession()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| 7db95b56_7d68_6c82_5d8a_8cc4d6d4156c c2be282d_110e_3809_ba91_f76a8d2a4b03["isEmpty()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| c2be282d_110e_3809_ba91_f76a8d2a4b03 4fd95670_5e98_9499_df09_140619cd138d["getOcspResponse()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| 4fd95670_5e98_9499_df09_140619cd138d 62c22963_254e_558e_59f0_10304b0c83d2["release()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| 62c22963_254e_558e_59f0_10304b0c83d2 5bfd738f_3448_e7c6_b382_edb87a3c5321["setLocalCertificate()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| 5bfd738f_3448_e7c6_b382_edb87a3c5321 2c05861a_91ed_2a69_db10_376c5af779a0["setClientAuth()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| 2c05861a_91ed_2a69_db10_376c5af779a0 2f49c5ea_7d60_da8f_2d32_72e4e8958e9e["setEnabledProtocols()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| 2f49c5ea_7d60_da8f_2d32_72e4e8958e9e bede7e4a_f60a_d5d6_dac7_80303af46c2c["isValidHostNameForSNI()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| bede7e4a_f60a_d5d6_dac7_80303af46c2c f3e3f180_c9e1_2c2f_b4a8_be9afb24dc37["isProtocolEnabled()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| f3e3f180_c9e1_2c2f_b4a8_be9afb24dc37 d0f145d8_8f24_09af_02a9_d6a3f99d7a51["calculateMaxWrapOverhead()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| d0f145d8_8f24_09af_02a9_d6a3f99d7a51 1fae7e09_5de0_48d7_717f_bb865b6a3921["configureEndpointVerification()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| 1fae7e09_5de0_48d7_717f_bb865b6a3921 c4b3e9d1_8ba5_707f_4649_4d5a628a2433["shutdown()"] 597187e9_65f2_df9a_22e3_c3e7eb0f231a -->|calls| c4b3e9d1_8ba5_707f_4649_4d5a628a2433 style 597187e9_65f2_df9a_22e3_c3e7eb0f231a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java lines 228–425
ReferenceCountedOpenSslEngine(ReferenceCountedOpenSslContext context, final ByteBufAllocator alloc, String peerHost,
int peerPort, boolean jdkCompatibilityMode, boolean leakDetection,
String endpointIdentificationAlgorithm, List<SNIServerName> serverNames) {
super(peerHost, peerPort);
OpenSsl.ensureAvailability();
engines = context.engines;
enableOcsp = context.enableOcsp;
groups = context.groups.clone();
this.jdkCompatibilityMode = jdkCompatibilityMode;
this.alloc = checkNotNull(alloc, "alloc");
apn = (OpenSslApplicationProtocolNegotiator) context.applicationProtocolNegotiator();
clientMode = context.isClient();
this.endpointIdentificationAlgorithm = endpointIdentificationAlgorithm;
this.serverNames = serverNames;
session = new ExtendedOpenSslSession(new DefaultOpenSslSession(context.sessionContext())) {
private String[] peerSupportedSignatureAlgorithms;
private List<SNIServerName> requestedServerNames;
@Override
public List<SNIServerName> getRequestedServerNames() {
if (clientMode) {
List<SNIServerName> names = ReferenceCountedOpenSslEngine.this.serverNames;
return names == null ? Collections.emptyList() : Collections.unmodifiableList(names);
} else {
synchronized (ReferenceCountedOpenSslEngine.this) {
if (requestedServerNames == null) {
if (destroyed) {
requestedServerNames = Collections.emptyList();
} else {
String name = SSL.getSniHostname(ssl);
requestedServerNames = (name == null || name.isEmpty()) ?
Collections.emptyList() :
// Convert to bytes as we do not want to do any strict validation of the
// SNIHostName while creating it.
Collections.singletonList(new SNIHostName(name.getBytes(CharsetUtil.UTF_8)));
}
}
return requestedServerNames;
}
}
}
@Override
public String[] getPeerSupportedSignatureAlgorithms() {
synchronized (ReferenceCountedOpenSslEngine.this) {
if (peerSupportedSignatureAlgorithms == null) {
if (destroyed) {
peerSupportedSignatureAlgorithms = EMPTY_STRINGS;
} else {
String[] algs = SSL.getSigAlgs(ssl);
if (algs == null) {
peerSupportedSignatureAlgorithms = EMPTY_STRINGS;
} else {
Set<String> algorithmList = new LinkedHashSet<>(algs.length);
for (String alg: algs) {
String converted = SignatureAlgorithmConverter.toJavaName(alg);
if (converted != null) {
algorithmList.add(converted);
}
}
peerSupportedSignatureAlgorithms = algorithmList.toArray(EMPTY_STRINGS);
}
}
}
return peerSupportedSignatureAlgorithms.clone();
}
}
@Override
public List<byte[]> getStatusResponses() {
byte[] ocspResponse = null;
if (enableOcsp && clientMode) {
synchronized (ReferenceCountedOpenSslEngine.this) {
if (!destroyed) {
ocspResponse = SSL.getOcspResponse(ssl);
}
}
}
return ocspResponse == null ?
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does ReferenceCountedOpenSslEngine() do?
ReferenceCountedOpenSslEngine() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java.
Where is ReferenceCountedOpenSslEngine() defined?
ReferenceCountedOpenSslEngine() is defined in handler/src/main/java/io/netty/handler/ssl/ReferenceCountedOpenSslEngine.java at line 228.
What does ReferenceCountedOpenSslEngine() call?
ReferenceCountedOpenSslEngine() calls 12 function(s): DefaultOpenSslSession, calculateMaxWrapOverhead, configureEndpointVerification, getOcspResponse, isEmpty, isProtocolEnabled, isValidHostNameForSNI, release, and 4 more.
What calls ReferenceCountedOpenSslEngine()?
ReferenceCountedOpenSslEngine() is called by 1 function(s): shutdown.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free