summary refs log tree commit diff
path: root/crypto/src
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src')
-rw-r--r--crypto/src/crypto/tls/RecordStream.cs2
-rw-r--r--crypto/src/crypto/tls/TlsProtocol.cs28
2 files changed, 13 insertions, 17 deletions
diff --git a/crypto/src/crypto/tls/RecordStream.cs b/crypto/src/crypto/tls/RecordStream.cs

index b1060fd6d..dc66d0df7 100644 --- a/crypto/src/crypto/tls/RecordStream.cs +++ b/crypto/src/crypto/tls/RecordStream.cs
@@ -359,7 +359,7 @@ namespace Org.BouncyCastle.Crypto.Tls case ContentType.alert: case ContentType.change_cipher_spec: case ContentType.handshake: - case ContentType.heartbeat: + //case ContentType.heartbeat: break; default: throw new TlsFatalAlert(alertDescription); diff --git a/crypto/src/crypto/tls/TlsProtocol.cs b/crypto/src/crypto/tls/TlsProtocol.cs
index f259812f8..05f06f5ea 100644 --- a/crypto/src/crypto/tls/TlsProtocol.cs +++ b/crypto/src/crypto/tls/TlsProtocol.cs
@@ -261,23 +261,19 @@ namespace Org.BouncyCastle.Crypto.Tls ProcessHandshake(); break; } - case ContentType.heartbeat: - { - if (!mAppDataReady) - throw new TlsFatalAlert(AlertDescription.unexpected_message); - - // TODO[RFC 6520] - // mHeartbeatQueue.AddData(buf, offset, len); - // ProcessHeartbeat(); - break; - } + //case ContentType.heartbeat: + //{ + // if (!mAppDataReady) + // throw new TlsFatalAlert(AlertDescription.unexpected_message); + + // // TODO[RFC 6520] + // //mHeartbeatQueue.AddData(buf, offset, len); + // //ProcessHeartbeat(); + // break; + //} default: - /* - * Uh, we don't know this protocol. - * - * RFC2246 defines on page 13, that we should ignore this. - */ - break; + // Record type should already have been checked + throw new TlsFatalAlert(AlertDescription.internal_error); } }