Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2013-06-20 14:16:11 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2013-06-20 14:16:11 +0400
commit79c93fb2592d08bdc71722ee96817193b3a62ef4 (patch)
tree35845556443ecf3e6aae90a6a9ec0fdf1320c5bc /core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java
parentf05bb9b974d73b2feaaac69c9b5a0c2bb05cbf6d (diff)
Sample code for acting on max_fragment_length extension
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java')
-rw-r--r--core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java b/core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java
index 0b86d36f..4d3bef9b 100644
--- a/core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java
+++ b/core/src/main/java/org/bouncycastle/crypto/tls/TlsClientProtocol.java
@@ -637,6 +637,18 @@ public class TlsClientProtocol
}
}
+// short maxFragmentLength = TlsExtensionsUtils.getMaxFragmentLengthExtension(serverExtensions);
+// if (maxFragmentLength >= 0)
+// {
+// if (maxFragmentLength != TlsExtensionsUtils.getMaxFragmentLengthExtension(clientExtensions))
+// {
+// throw new TlsFatalAlert(AlertDescription.illegal_parameter);
+// }
+//
+// int plainTextLimit = 1 << (8 + maxFragmentLength);
+// recordStream.setPlaintextLimit(plainTextLimit);
+// }
+
this.securityParameters.truncatedHMac = TlsExtensionsUtils.hasTruncatedHMacExtension(serverExtensions);
// TODO[RFC 3546] Should this code check that the 'extension_data' is empty?