TlsVerifier.cs 1.0 KB

123456789101112131415161718192021222324
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.IO;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto
  6. {
  7. /// <summary>Base interface for a TLS verifier that works with signatures and either raw message digests, or entire
  8. /// messages.</summary>
  9. public interface TlsVerifier
  10. {
  11. /// <exception cref="IOException"/>
  12. TlsStreamVerifier GetStreamVerifier(DigitallySigned signature);
  13. /// <summary>Return true if the passed in signature and hash represent a real signature.</summary>
  14. /// <param name="signature">the signature object containing the signature to be verified.</param>
  15. /// <param name="hash">the hash calculated for the signature.</param>
  16. /// <returns>true if signature verifies, false otherwise.</returns>
  17. /// <exception cref="IOException">in case of an exception verifying signature.</exception>
  18. bool VerifyRawSignature(DigitallySigned signature, byte[] hash);
  19. }
  20. }
  21. #pragma warning restore
  22. #endif