diff --git a/src/main/java/com/cloudbees/plugins/credentials/impl/CertificateCredentialsImpl.java b/src/main/java/com/cloudbees/plugins/credentials/impl/CertificateCredentialsImpl.java index 6237519e..296da3af 100644 --- a/src/main/java/com/cloudbees/plugins/credentials/impl/CertificateCredentialsImpl.java +++ b/src/main/java/com/cloudbees/plugins/credentials/impl/CertificateCredentialsImpl.java @@ -142,7 +142,7 @@ public CertificateCredentialsImpl(@CheckForNull CredentialsScope scope, try { keyStoreSource.toKeyStore(toCharArray(this.password)); } catch (GeneralSecurityException | IOException e) { - LOGGER.log(Level.WARNING, Messages.CertificateCredentialsImpl_InvalidKeystore(), e); + LOGGER.log(Level.WARNING, "Failed to create CertificateCredentials", e); throw new Descriptor.FormException(Messages.CertificateCredentialsImpl_InvalidKeystore(), e, "keyStoreSource"); } diff --git a/src/test/java/com/cloudbees/plugins/credentials/impl/CertificateCredentialsImplFIPSTest.java b/src/test/java/com/cloudbees/plugins/credentials/impl/CertificateCredentialsImplFIPSTest.java index 1a522bbd..f2a7ede9 100644 --- a/src/test/java/com/cloudbees/plugins/credentials/impl/CertificateCredentialsImplFIPSTest.java +++ b/src/test/java/com/cloudbees/plugins/credentials/impl/CertificateCredentialsImplFIPSTest.java @@ -24,8 +24,8 @@ public class CertificateCredentialsImplFIPSTest { @Rule - public RealJenkinsRule rule = new RealJenkinsRule().javaOptions("-Djenkins.security.FIPS140.COMPLIANCE=true"); - + public RealJenkinsRule rule = new RealJenkinsRule().withFIPSEnabled().javaOptions("-Xmx512m"); + @Rule public TemporaryFolder tmp = new TemporaryFolder(); diff --git a/src/test/resources/com/cloudbees/plugins/credentials/impl/validCerts.pem b/src/test/resources/com/cloudbees/plugins/credentials/impl/validCerts.pem index 7c15c314..06615750 100644 --- a/src/test/resources/com/cloudbees/plugins/credentials/impl/validCerts.pem +++ b/src/test/resources/com/cloudbees/plugins/credentials/impl/validCerts.pem @@ -1,20 +1,21 @@ -----BEGIN CERTIFICATE----- -MIIDTzCCAjegAwIBAgIU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