TlsNoCloseNotifyException.cs 966 B

12345678910111213141516171819202122232425
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.IO;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls
  6. {
  7. /// <summary>This exception will be thrown (only) when the connection is closed by the peer without sending a
  8. /// <see cref="AlertDescription.close_notify">close_notify</see> warning alert.</summary>
  9. /// <remarks>
  10. /// If this happens, the TLS protocol cannot rule out truncation of the connection data (potentially
  11. /// malicious). It may be possible to check for truncation via some property of a higher level protocol
  12. /// built upon TLS, e.g.the Content-Length header for HTTPS.
  13. /// </remarks>
  14. public class TlsNoCloseNotifyException
  15. : EndOfStreamException
  16. {
  17. public TlsNoCloseNotifyException()
  18. : base("No close_notify alert received before connection closed")
  19. {
  20. }
  21. }
  22. }
  23. #pragma warning restore
  24. #endif