TlsFatalAlert.cs 775 B

123456789101112131415161718192021222324252627282930
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
  5. {
  6. public class TlsFatalAlert
  7. : TlsException
  8. {
  9. private readonly byte alertDescription;
  10. public TlsFatalAlert(byte alertDescription)
  11. : this(alertDescription, null)
  12. {
  13. }
  14. public TlsFatalAlert(byte alertDescription, Exception alertCause)
  15. : base(Tls.AlertDescription.GetText(alertDescription), alertCause)
  16. {
  17. this.alertDescription = alertDescription;
  18. }
  19. public virtual byte AlertDescription
  20. {
  21. get { return alertDescription; }
  22. }
  23. }
  24. }
  25. #pragma warning restore
  26. #endif