@Provides @SuppressWarnings("unused") private WaveCertPathValidator provideWaveCertPathValidator(Config config, TimeSource timeSource, VerifiedCertChainCache certCache, TrustRootsProvider trustRootsProvider) { if (config.getBoolean("federation.waveserver_disable_signer_verification")) { return new DisabledCertPathValidator(); } else { return new CachedCertPathValidator(certCache, timeSource, trustRootsProvider); } }
private WaveSignatureVerifier getVerifier(CertPathStore store, boolean disableSignerVerification) { VerifiedCertChainCache cache = new DefaultCacheImpl(getFakeTimeSource()); WaveCertPathValidator validator; if (disableSignerVerification) { validator = new DisabledCertPathValidator(); } else { validator = new CachedCertPathValidator( cache, getFakeTimeSource(), getTrustRootsProvider()); } return new WaveSignatureVerifier(validator, store); }
private WaveSignatureVerifier getVerifier(CertPathStore store, boolean disableSignerVerification) { VerifiedCertChainCache cache = new DefaultCacheImpl(getFakeTimeSource()); WaveCertPathValidator validator; if (disableSignerVerification) { validator = new DisabledCertPathValidator(); } else { validator = new CachedCertPathValidator( cache, getFakeTimeSource(), getTrustRootsProvider()); } return new WaveSignatureVerifier(validator, store); }