Skip to content

CertificateCheck Class ​

Definition ​

Represents a class for checking SSL certificate information, including certificate chain validation, hash and cipher algorithms, key exchange algorithm, and days till expiration.

  • Namespace: JASE.Network
  • Assembly: JASE.Network.dll

Properties ​

NameDescription
CertificateGets the certificate information of the SSL connection.
ChainStatusGets the chain status of the SSL connection.
DaysTillExpirationGets the number of days until the SSL certificate expires.
ExceptionGets any exception thrown during the certificate check.
ExpiredGets a value indicating whether the SSL certificate has expired.
HostGets the hostname of the SSL connection.
NegotiatedCipherSuiteGets or sets the negotiated TLS cipher suite, if available.
PortGets the port of the SSL connection.
ProtocolGets the SSL protocol used in the SSL connection.
ProtocolsCheckedGets the SSL protocols checked for the SSL connection.
ResultOverall Result of the Certificate Check
SslEstablishedGets a value indicating whether the SSL connection has been established.
SslPolicyErrorsGets the SSL policy errors of the SSL connection.
TcpEstablishedGets a value indicating whether the TCP connection has been established.
TrustedCertificateChainGets a value indicating whether the SSL certificate chain is trusted.

Methods ​

NameDescription
CertificateCheck Check(string host, SslProtocols protocols, int port = null, int connectionTimeout = null)Performs a certificate check on the specified host and port using the specified SSL protocols, and returns a CertificateCheck object containing the results of the check.
Task<CertificateCheck> CheckAsync(string host, SslProtocols protocols, int port = null, int connectionTimeout = null, CancellationToken cancellationToken = null)Performs a certificate check on the specified host and port using the specified SSL/TLS protocols, and returns a CertificateCheck containing the connection and certificate results.
CertificateScanResult Scan(string host, SslProtocols protocols, int start = null, int end = null, int connectionTimeout = null, int maxParallelism = null)Scans the specified host for SSL certificates using the specified protocol and ports.
Task<CertificateScanResult> ScanAsync(string host, SslProtocols protocols, int start = null, int end = null, int connectionTimeout = null, int maxParallelism = null)Scans the specified host for SSL certificates using the specified protocol and ports.
bool ValidateCertificateChain(X509Chain chain, X509Certificate serverCert)Validates a certificate chain against the trusted root store.