TlsCredentialedAgreement.cs 929 B

1234567891011121314151617181920212223
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.IO;
  5. using BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto;
  6. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls
  7. {
  8. /// <summary>Support interface for generating a secret based on the credentials sent by a TLS peer.</summary>
  9. public interface TlsCredentialedAgreement
  10. : TlsCredentials
  11. {
  12. /// <summary>Calculate an agreed secret based on our credentials and the public key credentials of our peer.
  13. /// </summary>
  14. /// <param name="peerCertificate">public key certificate of our TLS peer.</param>
  15. /// <returns>the agreed secret.</returns>
  16. /// <exception cref="IOException">in case of an exception on generation of the secret.</exception>
  17. TlsSecret GenerateAgreement(TlsCertificate peerCertificate);
  18. }
  19. }
  20. #pragma warning restore
  21. #endif