PKIConfirmContent.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using Best.HTTP.SecureProtocol.Org.BouncyCastle.Utilities;
  5. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
  6. {
  7. /**
  8. * PKIConfirmContent ::= NULL
  9. */
  10. public class PkiConfirmContent
  11. : Asn1Encodable
  12. {
  13. public static PkiConfirmContent GetInstance(object obj)
  14. {
  15. if (obj == null)
  16. return null;
  17. if (obj is PkiConfirmContent pkiConfirmContent)
  18. return pkiConfirmContent;
  19. if (obj is Asn1Null asn1Null)
  20. return new PkiConfirmContent(asn1Null);
  21. throw new ArgumentException("Invalid object: " + Org.BouncyCastle.Utilities.Platform.GetTypeName(obj), nameof(obj));
  22. }
  23. private readonly Asn1Null m_val;
  24. public PkiConfirmContent()
  25. : this(DerNull.Instance)
  26. {
  27. }
  28. private PkiConfirmContent(Asn1Null val)
  29. {
  30. m_val = val;
  31. }
  32. /**
  33. * <pre>
  34. * PkiConfirmContent ::= NULL
  35. * </pre>
  36. * @return a basic ASN.1 object representation.
  37. */
  38. public override Asn1Object ToAsn1Object()
  39. {
  40. return m_val;
  41. }
  42. }
  43. }
  44. #pragma warning restore
  45. #endif