TlsCryptoParameters.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Tls.Crypto
  5. {
  6. // TODO[tls-port] Would rather this be sealed
  7. /// <summary>Carrier class for context-related parameters needed for creating secrets and ciphers.</summary>
  8. public class TlsCryptoParameters
  9. {
  10. private readonly TlsContext m_context;
  11. /// <summary>Base constructor.</summary>
  12. /// <param name="context">the context for this parameters object.</param>
  13. public TlsCryptoParameters(TlsContext context)
  14. {
  15. this.m_context = context;
  16. }
  17. public SecurityParameters SecurityParameters
  18. {
  19. get { return m_context.SecurityParameters; }
  20. }
  21. public ProtocolVersion ClientVersion
  22. {
  23. get { return m_context.ClientVersion; }
  24. }
  25. public ProtocolVersion RsaPreMasterSecretVersion
  26. {
  27. get { return m_context.RsaPreMasterSecretVersion; }
  28. }
  29. // TODO[tls-port] Would rather this be non-virtual
  30. public virtual ProtocolVersion ServerVersion
  31. {
  32. get { return m_context.ServerVersion; }
  33. }
  34. public bool IsServer
  35. {
  36. get { return m_context.IsServer; }
  37. }
  38. public TlsNonceGenerator NonceGenerator
  39. {
  40. get { return m_context.NonceGenerator; }
  41. }
  42. }
  43. }
  44. #pragma warning restore
  45. #endif