diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-06-22 08:55:11 +0400 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2013-06-22 08:55:11 +0400 |
commit | b1eaafbe96dd53b791d2b10204bd772f408f1835 (patch) | |
tree | 0e7879b72e634dd58419102005cf74234fe944bb /core/src/main/java/org/bouncycastle/crypto/tls/DTLSProtocol.java | |
parent | 91dbc4003bc6504d407b9a225872e4ac0ba5bf98 (diff) |
Add check that server status_request extension_data is empty (RFC 3546)
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/tls/DTLSProtocol.java')
-rw-r--r-- | core/src/main/java/org/bouncycastle/crypto/tls/DTLSProtocol.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/tls/DTLSProtocol.java b/core/src/main/java/org/bouncycastle/crypto/tls/DTLSProtocol.java index e27580c1..350c6c2b 100644 --- a/core/src/main/java/org/bouncycastle/crypto/tls/DTLSProtocol.java +++ b/core/src/main/java/org/bouncycastle/crypto/tls/DTLSProtocol.java @@ -49,6 +49,21 @@ public abstract class DTLSProtocol return maxFragmentLength; } + protected static boolean evaluateStatusRequestExtension(Hashtable serverExtensions, short alertDescription) + throws IOException + { + byte[] statusRequest = TlsUtils.getExtensionData(serverExtensions, TlsExtensionsUtils.EXT_status_request); + if (statusRequest == null) + { + return false; + } + if (statusRequest.length != 0) + { + throw new TlsFatalAlert(alertDescription); + } + return true; + } + protected static byte[] generateCertificate(Certificate certificate) throws IOException { |