-
Notifications
You must be signed in to change notification settings - Fork 66
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:
-
FileSystemKeyStoreKeyingDataProvider
is 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();
-
PKCS11KeyStoreKeyingDataProvider
is now created using a builder. ThePKCS11KeyStoreKeyingDataProvider#builder()
method is used to get a new builder. -
SigningCertSelector
was renamed toSigningCertificateSelector
and it now takes both the entries' alias and certificate. -
PKIXCertificateValidationProvider
is now created using a builder. ThePKIXCertificateValidationProvider#builder()
method is used to get a new builder. - The
AlgorithmsProviderEx
provider was removed and replaced bySignatureAlgorithms
to configure the different algorithms that are used in signature production. The corresponding methods in the signing profiles (e.g.withAlgorithmsProviderEx
) were also removed.SignatureAlgorithms
can 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
HttpTsaConfiguration
to configure the TSA or override the time-stamp token provider altogether in the signing profiles. - The following deprecated classes were removed:
-
BasicSignatureOptionsProvider
- useBasicSignatureOptions
-
DefaultTimeStampTokenProvider
andAuthenticatedTimeStampTokenProvider
- an HTTP-based time-stamp token provider is configured by default. UseHttpTsaConfiguration
to configure the TSA. -
DataObjectTransform
- useGenericAlgorithm
or specificAlgorithm
-derived classes.
-