TlsFatalAlert.cs 721 B

12345678910111213141516171819202122232425262728293031
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. using System.IO;
  4. namespace Org.BouncyCastle.Crypto.Tls
  5. {
  6. public class TlsFatalAlert
  7. : IOException
  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. #endif