userEventTriggered() — netty Function Reference
Architecture documentation for the userEventTriggered() function in SslMasterKeyHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 493df280_2550_14ad_7187_54d157713b0f["userEventTriggered()"] 16c3c161_9e82_cb54_67b5_0143c9e962b7["SslMasterKeyHandler"] 493df280_2550_14ad_7187_54d157713b0f -->|defined in| 16c3c161_9e82_cb54_67b5_0143c9e962b7 47322b4c_7e1d_314f_5eb3_cce47f2dfd44["masterKeyHandlerEnabled()"] 493df280_2550_14ad_7187_54d157713b0f -->|calls| 47322b4c_7e1d_314f_5eb3_cce47f2dfd44 e42c77d2_7605_113a_2167_f36f6b1d204f["isSunSslEngineAvailable()"] 493df280_2550_14ad_7187_54d157713b0f -->|calls| e42c77d2_7605_113a_2167_f36f6b1d204f da0bca2f_ce02_dc25_753d_1828ea88687e["accept()"] 493df280_2550_14ad_7187_54d157713b0f -->|calls| da0bca2f_ce02_dc25_753d_1828ea88687e style 493df280_2550_14ad_7187_54d157713b0f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
handler/src/main/java/io/netty/handler/ssl/SslMasterKeyHandler.java lines 124–149
@Override
public final void userEventTriggered(ChannelHandlerContext ctx, Object evt) {
//only try to log the session info if the ssl handshake has successfully completed.
if (evt == SslHandshakeCompletionEvent.SUCCESS && masterKeyHandlerEnabled()) {
final SslHandler handler = ctx.pipeline().get(SslHandler.class);
final SSLEngine engine = handler.engine();
final SSLSession sslSession = engine.getSession();
//the OpenJDK does not expose a way to get the master secret, so try to use reflection to get it.
if (isSunSslEngineAvailable() && sslSession.getClass().equals(SSL_SESSIONIMPL_CLASS)) {
final SecretKey secretKey;
try {
secretKey = (SecretKey) SSL_SESSIONIMPL_MASTER_SECRET_FIELD.get(sslSession);
} catch (IllegalAccessException e) {
throw new IllegalArgumentException("Failed to access the field 'masterSecret' " +
"via reflection.", e);
}
accept(secretKey, sslSession);
} else if (OpenSsl.isAvailable() && engine instanceof ReferenceCountedOpenSslEngine) {
SecretKeySpec secretKey = ((ReferenceCountedOpenSslEngine) engine).masterKey();
accept(secretKey, sslSession);
}
}
ctx.fireUserEventTriggered(evt);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does userEventTriggered() do?
userEventTriggered() is a function in the netty codebase, defined in handler/src/main/java/io/netty/handler/ssl/SslMasterKeyHandler.java.
Where is userEventTriggered() defined?
userEventTriggered() is defined in handler/src/main/java/io/netty/handler/ssl/SslMasterKeyHandler.java at line 124.
What does userEventTriggered() call?
userEventTriggered() calls 3 function(s): accept, isSunSslEngineAvailable, masterKeyHandlerEnabled.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free