iText 7 7.1.8 API
iText.Signatures.CertificateVerification Class Reference

This class consists of some methods that allow you to verify certificates. More...

Static Public Member Functions

static String  VerifyCertificate (X509Certificate cert, ICollection< X509Crl > crls)
  Verifies a single certificate for the current date. More...
 
static String  VerifyCertificate (X509Certificate cert, ICollection< X509Crl > crls, DateTime calendar)
  Verifies a single certificate. More...
 
static IList< VerificationException VerifyCertificates (X509Certificate[] certs, List< X509Certificate > keystore, ICollection< X509Crl > crls)
  Verifies a certificate chain against a KeyStore for the current date. More...
 
static IList< VerificationException VerifyCertificates (X509Certificate[] certs, List< X509Certificate > keystore, ICollection< X509Crl > crls, DateTime calendar)
  Verifies a certificate chain against a KeyStore. More...
 
static IList< VerificationException VerifyCertificates (X509Certificate[] certs, List< X509Certificate > keystore)
  Verifies a certificate chain against a KeyStore for the current date. More...
 
static IList< VerificationException VerifyCertificates (X509Certificate[] certs, List< X509Certificate > keystore, DateTime calendar)
  Verifies a certificate chain against a KeyStore. More...
 
static bool  VerifyOcspCertificates (BasicOcspResp ocsp, List< X509Certificate > keystore)
  Verifies an OCSP response against a KeyStore. More...
 
static bool  VerifyTimestampCertificates (TimeStampToken ts, List< X509Certificate > keystore)
  Verifies a time stamp against a KeyStore. More...
 

Detailed Description

This class consists of some methods that allow you to verify certificates.

Member Function Documentation

◆ VerifyCertificate() [1/2]

static String iText.Signatures.CertificateVerification.VerifyCertificate ( X509Certificate  cert,
ICollection< X509Crl >  crls 
)
inlinestatic

Verifies a single certificate for the current date.

Parameters
cert the certificate to verify
crls the certificate revocation list or
null
a String with the error description or null
if no error

◆ VerifyCertificate() [2/2]

static String iText.Signatures.CertificateVerification.VerifyCertificate ( X509Certificate  cert,
ICollection< X509Crl >  crls,
DateTime  calendar 
)
inlinestatic

Verifies a single certificate.

Parameters
cert the certificate to verify
crls the certificate revocation list or
null
"calendar">the date, shall not be null
a String with the error description or null
if no error

◆ VerifyCertificates() [1/4]

static IList<VerificationException> iText.Signatures.CertificateVerification.VerifyCertificates ( X509Certificate[]  certs,
List< X509Certificate >  keystore 
)
inlinestatic

Verifies a certificate chain against a KeyStore for the current date.

Parameters
certs the certificate chain
keystore the
KeyStore
null if the certificate chain could be validated or a
Object[]{cert,error} where cert is the
failed certificate and error is the error message

◆ VerifyCertificates() [2/4]

static IList<VerificationException> iText.Signatures.CertificateVerification.VerifyCertificates ( X509Certificate[]  certs,
List< X509Certificate >  keystore,
DateTime  calendar 
)
inlinestatic

Verifies a certificate chain against a KeyStore.

Parameters
certs the certificate chain
keystore the
KeyStore
"calendar">the date, shall not be null
null if the certificate chain could be validated or a
Object[]{cert,error} where cert is the
failed certificate and error is the error message

◆ VerifyCertificates() [3/4]

static IList<VerificationException> iText.Signatures.CertificateVerification.VerifyCertificates ( X509Certificate[]  certs,
List< X509Certificate >  keystore,
ICollection< X509Crl >  crls 
)
inlinestatic

Verifies a certificate chain against a KeyStore for the current date.

Parameters
certs the certificate chain
keystore the
KeyStore
"crls">the certificate revocation list or null
empty list if the certificate chain could be validated or a
Object[]{cert,error} where cert is the
failed certificate and error is the error message

◆ VerifyCertificates() [4/4]

static IList<VerificationException> iText.Signatures.CertificateVerification.VerifyCertificates ( X509Certificate[]  certs,
List< X509Certificate >  keystore,
ICollection< X509Crl >  crls,
DateTime  calendar 
)
inlinestatic

Verifies a certificate chain against a KeyStore.

Parameters
certs the certificate chain
keystore the
KeyStore
"crls">the certificate revocation list or null
"calendar">the date, shall not be null
empty list if the certificate chain could be validated or a
Object[]{cert,error} where cert is the
failed certificate and error is the error message

◆ VerifyOcspCertificates()

static bool iText.Signatures.CertificateVerification.VerifyOcspCertificates ( BasicOcspResp  ocsp,
List< X509Certificate >  keystore 
)
inlinestatic

Verifies an OCSP response against a KeyStore.

Parameters
ocsp the OCSP response
keystore the
KeyStore
"provider">the provider or null to use the BouncyCastle provider
true is a certificate was found

◆ VerifyTimestampCertificates()

static bool iText.Signatures.CertificateVerification.VerifyTimestampCertificates ( TimeStampToken  ts,
List< X509Certificate >  keystore 
)
inlinestatic

Verifies a time stamp against a KeyStore.

Parameters
ts the time stamp
keystore the
KeyStore
"provider">the provider or null to use the BouncyCastle provider
true is a certificate was found