iText 8.0.5 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 (IX509Certificate cert, ICollection< IX509Crl > crls)
  Verifies a single certificate for the current date. More...
 
static String  VerifyCertificate (IX509Certificate cert, ICollection< IX509Crl > crls, DateTime calendar)
  Verifies a single certificate. More...
 
static IList< VerificationException VerifyCertificates (IX509Certificate[] certs, List< IX509Certificate > keystore, ICollection< IX509Crl > crls)
  Verifies a certificate chain against a KeyStore for the current date. More...
 
static IList< VerificationException VerifyCertificates (IX509Certificate[] certs, List< IX509Certificate > keystore, ICollection< IX509Crl > crls, DateTime calendar)
  Verifies a certificate chain against a KeyStore. More...
 
static IList< VerificationException VerifyCertificates (IX509Certificate[] certs, List< IX509Certificate > keystore)
  Verifies a certificate chain against a KeyStore for the current date. More...
 
static IList< VerificationException VerifyCertificates (IX509Certificate[] certs, List< IX509Certificate > keystore, DateTime calendar)
  Verifies a certificate chain against a KeyStore. More...
 
static bool  VerifyOcspCertificates (IBasicOcspResponse ocsp, List< IX509Certificate > keystore)
  Verifies an OCSP response against a KeyStore. More...
 
static bool  VerifyTimestampCertificates (ITimeStampToken ts, List< IX509Certificate > keystore)
  Verifies a time stamp against a KeyStore. More...
 

Static Public Attributes

const String  HAS_UNSUPPORTED_EXTENSIONS = "Has unsupported critical extension"
 
const String  CERTIFICATE_REVOKED = "Certificate revoked"
 

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 ( IX509Certificate  cert,
ICollection< IX509Crl crls 
)
inlinestatic

Verifies a single certificate for the current date.

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

◆ VerifyCertificate() [2/2]

static String iText.Signatures.CertificateVerification.VerifyCertificate ( IX509Certificate  cert,
ICollection< IX509Crl 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
Returns
a String with the error description or null if no error

◆ VerifyCertificates() [1/4]

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

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

Parameters
certs the certificate chain
keystore the KeyStore
Returns
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 ( IX509Certificate[]  certs,
List< IX509Certificate 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
Returns
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 ( IX509Certificate[]  certs,
List< IX509Certificate keystore,
ICollection< IX509Crl 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
Returns
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 ( IX509Certificate[]  certs,
List< IX509Certificate keystore,
ICollection< IX509Crl 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
Returns
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 ( IBasicOcspResponse  ocsp,
List< IX509Certificate keystore 
)
inlinestatic

Verifies an OCSP response against a KeyStore.

Parameters
ocsp the OCSP response
keystore the KeyStore
Returns
true is a certificate was found

◆ VerifyTimestampCertificates()

static bool iText.Signatures.CertificateVerification.VerifyTimestampCertificates ( ITimeStampToken  ts,
List< IX509Certificate keystore 
)
inlinestatic

Verifies a time stamp against a KeyStore.

Parameters
ts the time stamp
keystore the KeyStore
Returns
true is a certificate was found