add all
This commit is contained in:
42
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsFatalAlertReceived.cs
vendored
Normal file
42
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/tls/TlsFatalAlertReceived.cs
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Tls
|
||||
{
|
||||
[Serializable]
|
||||
public class TlsFatalAlertReceived
|
||||
: TlsException
|
||||
{
|
||||
protected readonly byte m_alertDescription;
|
||||
|
||||
public TlsFatalAlertReceived(short alertDescription)
|
||||
: base(Tls.AlertDescription.GetText(alertDescription))
|
||||
{
|
||||
if (!TlsUtilities.IsValidUint8(alertDescription))
|
||||
throw new ArgumentOutOfRangeException(nameof(alertDescription));
|
||||
|
||||
m_alertDescription = (byte)alertDescription;
|
||||
}
|
||||
|
||||
protected TlsFatalAlertReceived(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
m_alertDescription = info.GetByte("alertDescription");
|
||||
}
|
||||
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(info, context);
|
||||
info.AddValue("alertDescription", m_alertDescription);
|
||||
}
|
||||
|
||||
public virtual short AlertDescription
|
||||
{
|
||||
get { return m_alertDescription; }
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
Reference in New Issue
Block a user