SslMasterKeyHandler is a channel-handler you can include in your pipeline to consume the master key
& session identifier for a TLS session.
This can be very useful, for instance the WiresharkSslMasterKeyHandler implementation will
log the secret & identifier in a format that is consumable by Wireshark -- allowing easy decryption of pcap/tcpdumps.
| Modifier and Type | Class and Description |
|---|---|
| private static class | SslMasterKeyHandler.WiresharkSslMasterKeyHandler
Record the session identifier and master key to the |
| Modifier and Type | Field and Description |
|---|---|
| private static final InternalLogger | |
| private static final Class | SSL_SESSIONIMPL_CLASS
The JRE SSLSessionImpl cannot be imported |
| private static final Field | SSL_SESSIONIMPL_MASTER_SECRET_FIELD
The master key field in the SSLSessionImpl |
| public static final String | SYSTEM_PROP_KEY
A system property that can be used to turn on/off the |
| private static final Throwable | UNAVAILABILITY_CAUSE
The unavailability cause of whether the private Sun implementation of SSLSessionImpl is available. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | accept(SecretKey
A 48-byte secret shared between the client and server. masterKey, SSLSession The current TLS session session)Consume the master key for the session and the sessionId |
| public static void | |
| public static boolean | |
| protected boolean | Returns: true if it should handle, false otherwise.Checks if the handler is set up to actually handle/accept the event. |
| public static SslMasterKeyHandler | |
| public static Throwable | Returns: the cause if unavailable.null if available.Returns the cause of unavailability. |
| public final void | userEventTriggered(ChannelHandlerContext ctx, Object evt)
Overrides io. Implements io. ChannelHandlerContext#fireUserEventTriggered(Object) to forward
to the next ChannelInboundHandler in the ChannelPipeline.
|
| logger | back to summary |
|---|---|
| private static final InternalLogger logger | |
| SSL_SESSIONIMPL_CLASS | back to summary |
|---|---|
| private static final Class<?> SSL_SESSIONIMPL_CLASS The JRE SSLSessionImpl cannot be imported | |
| SSL_SESSIONIMPL_MASTER_SECRET_FIELD | back to summary |
|---|---|
| private static final Field SSL_SESSIONIMPL_MASTER_SECRET_FIELD The master key field in the SSLSessionImpl | |
| SYSTEM_PROP_KEY | back to summary |
|---|---|
| public static final String SYSTEM_PROP_KEY A system property that can be used to turn on/off the | |
| UNAVAILABILITY_CAUSE | back to summary |
|---|---|
| private static final Throwable UNAVAILABILITY_CAUSE The unavailability cause of whether the private Sun implementation of SSLSessionImpl is available. | |
| SslMasterKeyHandler | back to summary |
|---|---|
| protected SslMasterKeyHandler() Constructor. | |
| accept | back to summary |
|---|---|
| protected abstract void accept(SecretKey masterKey, SSLSession session) Consume the master key for the session and the sessionId
| |
| ensureSunSslEngineAvailability | back to summary |
|---|---|
| public static void ensureSunSslEngineAvailability() Ensure that SSLSessionImpl is available.
| |
| isSunSslEngineAvailable | back to summary |
|---|---|
| public static boolean isSunSslEngineAvailable() | |
| masterKeyHandlerEnabled | back to summary |
|---|---|
| protected boolean masterKeyHandlerEnabled() Checks if the handler is set up to actually handle/accept the event.
By default the
| |
| newWireSharkSslMasterKeyHandler | back to summary |
|---|---|
| public static SslMasterKeyHandler newWireSharkSslMasterKeyHandler() Create a | |
| sunSslEngineUnavailabilityCause | back to summary |
|---|---|
| public static Throwable sunSslEngineUnavailabilityCause() Returns the cause of unavailability.
| |
| userEventTriggered | back to summary |
|---|---|
| public final void userEventTriggered(ChannelHandlerContext ctx, Object evt) Overrides io. Implements io. Doc from io. Calls
| |
InternalLogger named io.netty.wireshark.
ex. RSA Session-ID:XXX Master-Key:YYY
This format is understood by Wireshark 1.6.0.
See: Wireshark
The key and session identifier are forwarded to the log named 'io.netty.wireshark'.
| Modifier and Type | Field and Description |
|---|---|
| private static final InternalLogger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected void | accept(SecretKey
A 48-byte secret shared between the client and server. masterKey, SSLSession The current TLS session session)Implements abstract io. |
| wireshark_logger | back to summary |
|---|---|
| private static final InternalLogger wireshark_logger | |
| WiresharkSslMasterKeyHandler | back to summary |
|---|---|
| private WiresharkSslMasterKeyHandler() | |
| accept | back to summary |
|---|---|
| protected void accept(SecretKey masterKey, SSLSession session) Implements abstract io. Doc from io. Consume the master key for the session and the sessionId
| |