-
Notifications
You must be signed in to change notification settings - Fork 72
Migrating
Luís Gonçalves edited this page Feb 19, 2022
·
1 revision
Version 2.0 requires Java 11. In addition, it includes the following breaking changes:
-
FileSystemKeyStoreKeyingDataProvideris now created using a builder. TheFileSystemKeyStoreKeyingDataProvider#builder()method is used to get a new builder.KeyingDataProvider kp = FileSystemKeyStoreKeyingDataProvider .builder("pkcs12", "my/LG.pfx", SigningCertificateSelector.single()) .storePassword(new DirectPasswordProvider("storepwd")) // ... other builder options ... .build(); -
PKCS11KeyStoreKeyingDataProvideris now created using a builder. ThePKCS11KeyStoreKeyingDataProvider#builder()method is used to get a new builder. -
SigningCertSelectorwas renamed toSigningCertificateSelectorand it now takes both the entries' alias and certificate. -
PKIXCertificateValidationProvideris now created using a builder. ThePKIXCertificateValidationProvider#builder()method is used to get a new builder. - The
AlgorithmsProviderExprovider was removed and replaced bySignatureAlgorithmsto configure the different algorithms that are used in signature production. The corresponding methods in the signing profiles (e.g.withAlgorithmsProviderEx) were also removed.SignatureAlgorithmscan be configured in the signing profiles.XadesSigningProfile profile = new XadesCSigningProfile(...) .withSignatureAlgorithms(new SignatureAlgorithms() .withSignatureAlgorithm("RSA", ALGO_ID_SIGNATURE_RSA_SHA512)); - No TSA is configured by default. However, an HTTP-based time-stamp token provider is available by default. Use
HttpTsaConfigurationto configure the TSA or override the time-stamp token provider altogether in the signing profiles. - The following deprecated classes were removed:
-
BasicSignatureOptionsProvider- useBasicSignatureOptions -
DefaultTimeStampTokenProviderandAuthenticatedTimeStampTokenProvider- an HTTP-based time-stamp token provider is configured by default. UseHttpTsaConfigurationto configure the TSA. -
DataObjectTransform- useGenericAlgorithmor specificAlgorithm-derived classes.
-