@Test public void verifyValidSignatureHashChain() throws Exception { Resolver resolver; resolver = new Resolver() { @Override public InputStream resolve(String uri) throws IOException { if ("/attachment1".equals(uri)) { return IOUtils.toInputStream("blaah"); } else { return super.resolve(uri); } } }.withHashChain("src/test/signatures/hash-chain-1.xml") .withMessage("src/test/signatures/message-1.xml"); createSignatureVerifier("src/test/signatures/batch-sig.xml", "src/test/signatures/hash-chain-result.xml", resolver).verify(CONSUMER_ID, CORRECT_VALIDATION_DATE); }
public void verify(ClientId signer, Date atDate) throws Exception { if (verifySchema) { verifySchema(); } if (hashChainResult != null && signature.references(SIG_HASH_CHAIN_RESULT)) { verifyHashChain(); } X509Certificate signingCert = getSigningCertificate(); verifySignerName(signer, signingCert); verifySignatureValue(signingCert); verifyTimestampManifests(); verifyCertificateChain(atDate, signer, signingCert); }
SignatureVerifier { public void verify(ClientId signer, Date atDate) throws Exception { if (verifySchema) { verifySchema(); } if (hashChainResult != null && signature.references(SIG_HASH_CHAIN_RESULT)) { verifyHashChain(); } X509Certificate signingCert = getSigningCertificate(); verifySignerName(signer, signingCert); verifySignatureValue(signingCert); verifyTimestampManifests(); verifyCertificateChain(atDate, signer, signingCert); } }
SignatureVerifier { public void verify(ClientId signer, Date atDate) throws Exception { if (verifySchema) { verifySchema(); } if (hashChainResult != null && signature.references(SIG_HASH_CHAIN_RESULT)) { verifyHashChain(); } X509Certificate signingCert = getSigningCertificate(); verifySignerName(signer, signingCert); verifySignatureValue(signingCert); verifyTimestampManifests(); verifyCertificateChain(atDate, signer, signingCert); } SignatureVerifier(SignatureData signatureData);  SignatureVerifier(Signature signature);  SignatureVerifier(Signature signature, String hashChainResult,
            String hashChain); }
SignatureVerifier { public void verify(ClientId signer, Date atDate) throws Exception { if (verifySchema) { verifySchema(); } if (hashChainResult != null && signature.references(SIG_HASH_CHAIN_RESULT)) { verifyHashChain(); } X509Certificate signingCert = getSigningCertificate(); verifySignerName(signer, signingCert); verifySignatureValue(signingCert); verifyTimestampManifests(); verifyCertificateChain(atDate, signer, signingCert); } SignatureVerifier(SignatureData signatureData);  SignatureVerifier(Signature signature);  SignatureVerifier(Signature signature, String hashChainResult,
            String hashChain); Signature getSignature(); void addParts(List<MessagePart> messageParts); void addPart(MessagePart part); void setSignatureResourceResolver(ResourceResolverSpi resolver); void setHashChainResourceResolver(
            HashChainReferenceResolver resolver); void setVerifySchema(boolean shouldVerifySchema); X509Certificate getSigningCertificate(); OCSPResp getSigningOcspResponse(String instanceIdentifier); void verify(ClientId signer, Date atDate); }
SignatureVerifier { public void verify(ClientId signer, Date atDate) throws Exception { if (verifySchema) { verifySchema(); } if (hashChainResult != null && signature.references(SIG_HASH_CHAIN_RESULT)) { verifyHashChain(); } X509Certificate signingCert = getSigningCertificate(); verifySignerName(signer, signingCert); verifySignatureValue(signingCert); verifyTimestampManifests(); verifyCertificateChain(atDate, signer, signingCert); } SignatureVerifier(SignatureData signatureData);  SignatureVerifier(Signature signature);  SignatureVerifier(Signature signature, String hashChainResult,
            String hashChain); Signature getSignature(); void addParts(List<MessagePart> messageParts); void addPart(MessagePart part); void setSignatureResourceResolver(ResourceResolverSpi resolver); void setHashChainResourceResolver(
            HashChainReferenceResolver resolver); void setVerifySchema(boolean shouldVerifySchema); X509Certificate getSigningCertificate(); OCSPResp getSigningOcspResponse(String instanceIdentifier); void verify(ClientId signer, Date atDate);  }