-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Expand file tree
/
Copy pathSslStatus.cs
More file actions
58 lines (51 loc) · 2.13 KB
/
SslStatus.cs
File metadata and controls
58 lines (51 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright © 2016 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using System.Security.Cryptography.X509Certificates;
namespace CefSharp
{
/// <summary>
/// Class representing the SSL information for a navigation entry.
/// </summary>
public sealed class SslStatus
{
/// <summary>
/// Returns true if the status is related to a secure SSL/TLS connection.
/// </summary>
public bool IsSecureConnection { get; private set; }
/// <summary>
/// Returns a bitmask containing any and all problems verifying the server certificate.
/// If the certificate is valid then <see cref="CertStatus.None"/> is returned.
/// </summary>
public CertStatus CertStatus { get; private set; }
/// <summary>
/// Returns the SSL version used for the SSL connection.
/// </summary>
/// <returns></returns>
public SslVersion SslVersion { get; private set; }
/// <summary>
/// Returns a bitmask containing the page security content status.
/// </summary>
public SslContentStatus ContentStatus { get; private set; }
/// <summary>
/// Returns the X.509 certificate.
/// </summary>
public X509Certificate2 X509Certificate { get; private set; }
/// <summary>
/// SslStatus
/// </summary>
/// <param name="isSecureConnection">is secure</param>
/// <param name="certStatus">cert status</param>
/// <param name="sslVersion">ssl version</param>
/// <param name="contentStatus">content status</param>
/// <param name="certificate">certificate</param>
public SslStatus(bool isSecureConnection, CertStatus certStatus, SslVersion sslVersion, SslContentStatus contentStatus, X509Certificate2 certificate)
{
IsSecureConnection = isSecureConnection;
CertStatus = certStatus;
SslVersion = sslVersion;
ContentStatus = contentStatus;
X509Certificate = certificate;
}
}
}