diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-08-26 10:58:46 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-08-26 10:58:46 +0700 |
commit | f257ee083080ada68a5dca06fa69a1203a0b8783 (patch) | |
tree | e621f8e4a6864adcbb42b6b7a00358952d8ac3c3 /crypto/test | |
parent | Cleanup obsolete code warnings (diff) | |
download | BouncyCastle.NET-ed25519-f257ee083080ada68a5dca06fa69a1203a0b8783.tar.xz |
Add methods to give readable text for alerts
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/src/crypto/tls/test/MockTlsClient.cs | 8 | ||||
-rw-r--r-- | crypto/test/src/crypto/tls/test/MockTlsServer.cs | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/crypto/test/src/crypto/tls/test/MockTlsClient.cs b/crypto/test/src/crypto/tls/test/MockTlsClient.cs index 61521adca..893399c8e 100644 --- a/crypto/test/src/crypto/tls/test/MockTlsClient.cs +++ b/crypto/test/src/crypto/tls/test/MockTlsClient.cs @@ -26,8 +26,8 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests public override void NotifyAlertRaised(byte alertLevel, byte alertDescription, string message, Exception cause) { TextWriter output = (alertLevel == AlertLevel.fatal) ? Console.Error : Console.Out; - output.WriteLine("TLS client raised alert (AlertLevel." + alertLevel + ", AlertDescription." + alertDescription - + ")"); + output.WriteLine("TLS client raised alert: " + AlertLevel.GetText(alertLevel) + + ", " + AlertDescription.GetText(alertDescription)); if (message != null) { output.WriteLine("> " + message); @@ -41,8 +41,8 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests public override void NotifyAlertReceived(byte alertLevel, byte alertDescription) { TextWriter output = (alertLevel == AlertLevel.fatal) ? Console.Error : Console.Out; - output.WriteLine("TLS client received alert (AlertLevel." + alertLevel + ", AlertDescription." - + alertDescription + ")"); + output.WriteLine("TLS client received alert: " + AlertLevel.GetText(alertLevel) + + ", " + AlertDescription.GetText(alertDescription)); } public override int[] GetCipherSuites() diff --git a/crypto/test/src/crypto/tls/test/MockTlsServer.cs b/crypto/test/src/crypto/tls/test/MockTlsServer.cs index 54a645d96..14d6b9839 100644 --- a/crypto/test/src/crypto/tls/test/MockTlsServer.cs +++ b/crypto/test/src/crypto/tls/test/MockTlsServer.cs @@ -13,8 +13,8 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests public override void NotifyAlertRaised(byte alertLevel, byte alertDescription, string message, Exception cause) { TextWriter output = (alertLevel == AlertLevel.fatal) ? Console.Error : Console.Out; - output.WriteLine("TLS client raised alert (AlertLevel." + alertLevel + ", AlertDescription." + alertDescription - + ")"); + output.WriteLine("TLS server raised alert: " + AlertLevel.GetText(alertLevel) + + ", " + AlertDescription.GetText(alertDescription)); if (message != null) { output.WriteLine("> " + message); @@ -28,8 +28,8 @@ namespace Org.BouncyCastle.Crypto.Tls.Tests public override void NotifyAlertReceived(byte alertLevel, byte alertDescription) { TextWriter output = (alertLevel == AlertLevel.fatal) ? Console.Error : Console.Out; - output.WriteLine("TLS client received alert (AlertLevel." + alertLevel + ", AlertDescription." - + alertDescription + ")"); + output.WriteLine("TLS server received alert: " + AlertLevel.GetText(alertLevel) + + ", " + AlertDescription.GetText(alertDescription)); } protected override int[] GetCipherSuites() |