@Test void v1CaCert() throws Exception { CertifiedPublicKey certificate = factory.decode(v1CaCert); assertTrue(certificate.isSignedBy(certificate.getPublicKeyParameters()), "CA should verify itself."); assertThat(certificate, instanceOf(X509CertifiedPublicKey.class)); X509CertifiedPublicKey cert = (X509CertifiedPublicKey) certificate; assertThat(cert.getVersionNumber(), equalTo(1)); assertThat(cert.isRootCA(), equalTo(true)); }
@Override public CertifiedPublicKey decode(byte[] encoded) throws IOException { return convert(new X509CertificateHolder(encoded)); }
BcX509CertificateFactory implements CertificateFactory { @Override public CertifiedPublicKey decode(byte[] encoded) throws IOException { return convert(new X509CertificateHolder(encoded)); } }
BcX509CertificateFactory implements CertificateFactory { @Override public CertifiedPublicKey decode(byte[] encoded) throws IOException { return convert(new X509CertificateHolder(encoded)); }  }
BcX509CertificateFactory implements CertificateFactory { @Override public CertifiedPublicKey decode(byte[] encoded) throws IOException { return convert(new X509CertificateHolder(encoded)); }  @Override CertifiedPublicKey decode(byte[] encoded); CertifiedPublicKey convert(X509CertificateHolder cert); }
BcX509CertificateFactory implements CertificateFactory { @Override public CertifiedPublicKey decode(byte[] encoded) throws IOException { return convert(new X509CertificateHolder(encoded)); }  @Override CertifiedPublicKey decode(byte[] encoded); CertifiedPublicKey convert(X509CertificateHolder cert);  }