Skip to content

Commit c040eb3

Browse files
committed
Refactoring in TlsProtocol
1 parent 6234265 commit c040eb3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tls/src/main/java/org/bouncycastle/tls/TlsProtocol.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ protected void safeWriteRecord(short type, byte[] buf, int offset, int len)
943943
{
944944
try
945945
{
946-
recordStream.writeRecord(type, buf, offset, len);
946+
writeRecord(type, buf, offset, len);
947947
}
948948
catch (TlsFatalAlert e)
949949
{
@@ -962,6 +962,12 @@ protected void safeWriteRecord(short type, byte[] buf, int offset, int len)
962962
}
963963
}
964964

965+
protected void writeRecord(short type, byte[] buf, int off, int len)
966+
throws IOException
967+
{
968+
recordStream.writeRecord(type, buf, off, len);
969+
}
970+
965971
/**
966972
* Write some application data. Fragmentation is handled internally. Usable in both blocking/non-blocking
967973
* modes.<br>
@@ -1699,7 +1705,7 @@ protected void raiseAlertFatal(short alertDescription, String message, Throwable
16991705

17001706
try
17011707
{
1702-
recordStream.writeRecord(ContentType.alert, alert, 0, 2);
1708+
writeRecord(ContentType.alert, alert, 0, 2);
17031709
}
17041710
catch (Exception e)
17051711
{

0 commit comments

Comments
 (0)