Skip to main content
Skip table of contents

Digital signatures - chapter 3

These examples were written in the context of Chapter 3 - "Certificate Authorities, certificate revocation and time stamping" of the Digital Signatures for PDF documents eBook.


c3_01_signwithcacert

Signing a document with a PKCS12 file from the CAcert Certificate Authority:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_01_SignWithCAcert.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_01_SignWithCAcert.cs##


c3_02_getcrlurl

Getting the Certificate Revocation List (CRL) URLs from a certificate chain:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_02_GetCrlUrl.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_02_GetCrlUrl.cs##


c3_03_signwithcrldefaultimp

Using the default CrlClient implementation:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_03_SignWithCRLDefaultImp.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_03_SignWithCRLDefaultImp.cs##


c3_04_signwithcrlonline

Getting the CRL online:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_04_SignWithCRLOnline.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_04_SignWithCRLOnline.cs##


c3_05_signwithcrloffline

Creating a CrlClient using an offline copy of the CRL:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_05_SignWithCRLOffline.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_05_SignWithCRLOffline.cs##


c3_06_getocspurl

Fetching the Online Certificate Status Protocol (OCSP) URL from a certificate:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_06_GetOcspUrl.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_06_GetOcspUrl.cs##


c3_07_signwithocsp

Signing a document with the OCSP:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_07_SignWithOCSP.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_07_SignWithOCSP.cs##


c3_08_gettsaurl

Extracting a Time Stamping Authority (TSA) URL from a certificate:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_08_GetTsaUrl.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_08_GetTsaUrl.cs##

c3_09_signwithtsa

Signing a document with TSAClientBouncyCastle, an implementation of TSAClient:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_09_SignWithTSA.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_09_SignWithTSA.cs##


c3_10_signwithtsaevent

Adding an event to a TSAClientBouncyCastle instance:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_10_SignWithTSAEvent.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_10_SignWithTSAEvent.cs##


c3_11_signwithtoken

Signing a document with a USB token using Microsoft CryptoAPI (MSCAPI) - currently only available for Java:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_11_SignWithToken.java##

c3_12_signwithestimatedsize

Estimating the size in bytes of the signature content:

##GITHUB:https://github.com/itext/i7js-signatures/blob/develop/src/test/java/com/itextpdf/samples/signatures/chapter03/C3_12_SignWithEstimatedSize.java##

##GITHUB:https://github.com/itext/i7ns-samples/blob/develop/itext/itext.publications/itext.publications.signatures/itext/samples/signatures/chapter03/C3_12_SignWithEstimatedSize.cs##

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.