BouncyCastleProviderConfiguration { @Bean public JcaContentSignerBuilder jcaContentSignerBuilder(final BouncyCastleFipsProvider jceProvider) { return new JcaContentSignerBuilder("SHA256withRSA").setProvider(jceProvider); }  @Bean BouncyCastleFipsProvider bouncyCastleProvider(); @Bean JcaContentSignerBuilder jcaContentSignerBuilder(final BouncyCastleFipsProvider jceProvider); @Bean JcaX509CertificateConverter jcaX509CertificateConverter(final BouncyCastleFipsProvider jceProvider);  }
@Test public void jcaContentSignerBuilder() throws Exception { final PrivateKey key = generator.generateKeyPair().getPrivate(); final ContentSigner signer = jcaContentSignerBuilder.build(key); assertThat(signer.getAlgorithmIdentifier().getAlgorithm(), equalTo(sha256WithRSAEncryption)); }