Skip to content

Commit 6234265

Browse files
committed
BCJSSE: Log inbound handshake messages (FINEST)
1 parent 8f0f285 commit 6234265

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tls/src/main/java/org/bouncycastle/jsse/provider/ProvTlsClientProtocol.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import java.util.logging.Level;
99
import java.util.logging.Logger;
1010

11+
import org.bouncycastle.tls.HandshakeMessageInput;
12+
import org.bouncycastle.tls.HandshakeType;
1113
import org.bouncycastle.tls.RenegotiationPolicy;
1214
import org.bouncycastle.tls.ServerHello;
1315
import org.bouncycastle.tls.TlsClientProtocol;
@@ -40,6 +42,18 @@ protected int getRenegotiationPolicy()
4042
return provAcceptRenegotiation ? RenegotiationPolicy.ACCEPT : RenegotiationPolicy.DENY;
4143
}
4244

45+
@Override
46+
protected void handleHandshakeMessage(short type, HandshakeMessageInput buf) throws IOException
47+
{
48+
if (LOG.isLoggable(Level.FINEST))
49+
{
50+
int length = buf.available();
51+
LOG.finest(getClientID() + " inbound handshake message: " + HandshakeType.getText(type) + "[" + length + "]");
52+
}
53+
54+
super.handleHandshakeMessage(type, buf);
55+
}
56+
4357
@Override
4458
protected ServerHello receiveServerHelloMessage(ByteArrayInputStream buf) throws IOException
4559
{

0 commit comments

Comments
 (0)