summary refs log tree commit diff
path: root/crypto/src/crypto/tls/TlsFatalAlert.cs
blob: 6f189817976526b09f7a336ad20d2968ae427e74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;

namespace Org.BouncyCastle.Crypto.Tls
{
    public class TlsFatalAlert
        : TlsException
    {
        private readonly byte alertDescription;

        public TlsFatalAlert(byte alertDescription)
            : this(alertDescription, null)
        {
        }

        public TlsFatalAlert(byte alertDescription, Exception alertCause)
            : base(Tls.AlertDescription.GetText(alertDescription), alertCause)
        {
            this.alertDescription = alertDescription;
        }

        public virtual byte AlertDescription
        {
            get { return alertDescription; }
        }
    }
}