add all
This commit is contained in:
66
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidatorResult.cs
vendored
Normal file
66
Packages/com.tivadar.best.http/Runtime/3rdParty/BouncyCastle/pkix/PkixCertPathValidatorResult.cs
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
|
||||
#pragma warning disable
|
||||
using System;
|
||||
using System.Text;
|
||||
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Crypto;
|
||||
using Best.HTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
|
||||
namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Pkix
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for PkixCertPathValidatorResult.
|
||||
/// </summary>
|
||||
public class PkixCertPathValidatorResult
|
||||
//: ICertPathValidatorResult
|
||||
{
|
||||
private TrustAnchor trustAnchor;
|
||||
private PkixPolicyNode policyTree;
|
||||
private AsymmetricKeyParameter subjectPublicKey;
|
||||
|
||||
public PkixPolicyNode PolicyTree
|
||||
{
|
||||
get { return this.policyTree; }
|
||||
}
|
||||
|
||||
public TrustAnchor TrustAnchor
|
||||
{
|
||||
get { return this.trustAnchor; }
|
||||
}
|
||||
|
||||
public AsymmetricKeyParameter SubjectPublicKey
|
||||
{
|
||||
get { return this.subjectPublicKey; }
|
||||
}
|
||||
|
||||
public PkixCertPathValidatorResult(TrustAnchor trustAnchor, PkixPolicyNode policyTree,
|
||||
AsymmetricKeyParameter subjectPublicKey)
|
||||
{
|
||||
if (trustAnchor == null)
|
||||
throw new ArgumentNullException(nameof(trustAnchor));
|
||||
if (subjectPublicKey == null)
|
||||
throw new ArgumentNullException(nameof(subjectPublicKey));
|
||||
|
||||
this.trustAnchor = trustAnchor;
|
||||
this.policyTree = policyTree;
|
||||
this.subjectPublicKey = subjectPublicKey;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new PkixCertPathValidatorResult(this.TrustAnchor, this.PolicyTree, this.SubjectPublicKey);
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.AppendLine("PKIXCertPathValidatorResult: [");
|
||||
sb.Append(" Trust Anchor: ").Append(TrustAnchor).AppendLine();
|
||||
sb.Append(" Policy Tree: ").Append(PolicyTree).AppendLine();
|
||||
sb.Append(" Subject Public Key: ").Append(SubjectPublicKey).AppendLine();
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore
|
||||
#endif
|
||||
Reference in New Issue
Block a user