@Override protected void setUp() throws Exception { TimeSource time = new DefaultTimeSource(); VerifiedCertChainCache cache = new DefaultCacheImpl(time); validator = new CachedCertPathValidator(cache, time, new DefaultTrustRootsProvider()); CertificateFactory fac = CertificateFactory.getInstance("X509"); X509Certificate ourCert = (X509Certificate) fac.generateCertificate( new ByteArrayInputStream(GOOGLE_CERT.getBytes())); X509Certificate intermediateCert = (X509Certificate) fac.generateCertificate( new ByteArrayInputStream(INTERMEDIATE_CERT.getBytes())); certs = ImmutableList.of(ourCert, intermediateCert); }
@Override protected void setUp() throws Exception { TimeSource time = new DefaultTimeSource(); VerifiedCertChainCache cache = new DefaultCacheImpl(time); validator = new CachedCertPathValidator(cache, time, new DefaultTrustRootsProvider()); CertificateFactory fac = CertificateFactory.getInstance("X509"); X509Certificate ourCert = (X509Certificate) fac.generateCertificate( new ByteArrayInputStream(GOOGLE_CERT.getBytes())); X509Certificate intermediateCert = (X509Certificate) fac.generateCertificate( new ByteArrayInputStream(INTERMEDIATE_CERT.getBytes())); certs = ImmutableList.of(ourCert, intermediateCert); }
private WaveSignatureVerifier getRealVerifier(CertPathStore store) throws Exception { TrustRootsProvider trustRoots = new DefaultTrustRootsProvider(); VerifiedCertChainCache cache = new DefaultCacheImpl(getFakeTimeSource()); WaveCertPathValidator validator = new CachedCertPathValidator( cache, getFakeTimeSource(), trustRoots); return new WaveSignatureVerifier(validator, store); }
private WaveSignatureVerifier getRealVerifier(CertPathStore store) throws Exception { TrustRootsProvider trustRoots = new DefaultTrustRootsProvider(); VerifiedCertChainCache cache = new DefaultCacheImpl(getFakeTimeSource()); WaveCertPathValidator validator = new CachedCertPathValidator( cache, getFakeTimeSource(), trustRoots); return new WaveSignatureVerifier(validator, store); }