DERSetParser.cs 621 B

123456789101112131415161718192021222324252627282930
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1
  5. {
  6. // TODO[asn1] Should be renamed/replaced with DLSetParser
  7. public class DerSetParser
  8. : Asn1SetParser
  9. {
  10. private readonly Asn1StreamParser m_parser;
  11. internal DerSetParser(Asn1StreamParser parser)
  12. {
  13. this.m_parser = parser;
  14. }
  15. public IAsn1Convertible ReadObject()
  16. {
  17. return m_parser.ReadObject();
  18. }
  19. public Asn1Object ToAsn1Object()
  20. {
  21. return DLSet.FromVector(m_parser.ReadVector());
  22. }
  23. }
  24. }
  25. #pragma warning restore
  26. #endif