CefSslStatus.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. namespace Xilium.CefGlue
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Diagnostics;
  6. using System.Runtime.InteropServices;
  7. using Xilium.CefGlue.Interop;
  8. /// <summary>
  9. /// Class representing the SSL information for a navigation entry.
  10. /// </summary>
  11. public sealed unsafe partial class CefSslStatus
  12. {
  13. /// <summary>
  14. /// Returns true if the status is related to a secure SSL/TLS connection.
  15. /// </summary>
  16. public bool IsSecureConnection
  17. {
  18. get { return cef_sslstatus_t.is_secure_connection(_self) != 0; }
  19. }
  20. /// <summary>
  21. /// Returns a bitmask containing any and all problems verifying the server
  22. /// certificate.
  23. /// </summary>
  24. public CefCertStatus CertStatus
  25. {
  26. get { return cef_sslstatus_t.get_cert_status(_self); }
  27. }
  28. /// <summary>
  29. /// Returns the SSL version used for the SSL connection.
  30. /// </summary>
  31. public CefSslVersion SslVersion
  32. {
  33. get { return cef_sslstatus_t.get_sslversion(_self); }
  34. }
  35. /// <summary>
  36. /// Returns a bitmask containing the page security content status.
  37. /// </summary>
  38. public CefSslContentStatus ContentStatus
  39. {
  40. get { return cef_sslstatus_t.get_content_status(_self); }
  41. }
  42. /// <summary>
  43. /// Returns the X.509 certificate.
  44. /// </summary>
  45. public CefX509Certificate GetX509Certificate()
  46. {
  47. return CefX509Certificate.FromNative(
  48. cef_sslstatus_t.get_x509certificate(_self)
  49. );
  50. }
  51. }
  52. }