| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
- #pragma warning disable
- using System;
- using System.Text;
- using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
- using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
- namespace BestHTTP.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
|