DERExternalParser.cs 516 B

1234567891011121314151617181920212223242526272829
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. using System.IO;
  4. namespace Org.BouncyCastle.Asn1
  5. {
  6. public class DerExternalParser
  7. : Asn1Encodable
  8. {
  9. private readonly Asn1StreamParser _parser;
  10. public DerExternalParser(Asn1StreamParser parser)
  11. {
  12. this._parser = parser;
  13. }
  14. public IAsn1Convertible ReadObject()
  15. {
  16. return _parser.ReadObject();
  17. }
  18. public override Asn1Object ToAsn1Object()
  19. {
  20. return new DerExternal(_parser.ReadVector());
  21. }
  22. }
  23. }
  24. #endif