@Test void v1Cert() throws Exception { CertifiedPublicKey caCert = factory.decode(v1CaCert); CertifiedPublicKey certificate = factory.decode(v1Cert); assertTrue(certificate.isSignedBy(caCert.getPublicKeyParameters()), "End certificate should be verified by CA."); assertThat(certificate, instanceOf(X509CertifiedPublicKey.class)); X509CertifiedPublicKey cert = (X509CertifiedPublicKey) certificate; assertThat(cert.getVersionNumber(), equalTo(1)); }
@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);  }