PkixAttrCertChecker.cs 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.Collections;
  5. using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
  6. using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
  7. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Pkix
  8. {
  9. public abstract class PkixAttrCertChecker
  10. {
  11. /**
  12. * Returns an immutable <code>Set</code> of X.509 attribute certificate
  13. * extensions that this <code>PkixAttrCertChecker</code> supports or
  14. * <code>null</code> if no extensions are supported.
  15. * <p>
  16. * Each element of the set is a <code>String</code> representing the
  17. * Object Identifier (OID) of the X.509 extension that is supported.
  18. * </p>
  19. * <p>
  20. * All X.509 attribute certificate extensions that a
  21. * <code>PkixAttrCertChecker</code> might possibly be able to process
  22. * should be included in the set.
  23. * </p>
  24. *
  25. * @return an immutable <code>Set</code> of X.509 extension OIDs (in
  26. * <code>String</code> format) supported by this
  27. * <code>PkixAttrCertChecker</code>, or <code>null</code> if no
  28. * extensions are supported
  29. */
  30. public abstract ISet GetSupportedExtensions();
  31. /**
  32. * Performs checks on the specified attribute certificate. Every handled
  33. * extension is rmeoved from the <code>unresolvedCritExts</code>
  34. * collection.
  35. *
  36. * @param attrCert The attribute certificate to be checked.
  37. * @param certPath The certificate path which belongs to the attribute
  38. * certificate issuer public key certificate.
  39. * @param holderCertPath The certificate path which belongs to the holder
  40. * certificate.
  41. * @param unresolvedCritExts a <code>Collection</code> of OID strings
  42. * representing the current set of unresolved critical extensions
  43. * @throws CertPathValidatorException if the specified attribute certificate
  44. * does not pass the check.
  45. */
  46. public abstract void Check(IX509AttributeCertificate attrCert, PkixCertPath certPath,
  47. PkixCertPath holderCertPath, ICollection unresolvedCritExts);
  48. /**
  49. * Returns a clone of this object.
  50. *
  51. * @return a copy of this <code>PkixAttrCertChecker</code>
  52. */
  53. public abstract PkixAttrCertChecker Clone();
  54. }
  55. }
  56. #pragma warning restore
  57. #endif