AggregationHashChainAlgorithmDeprecatedRule extends BaseRule { public VerificationErrorCode getErrorCode() { return VerificationErrorCode.INT_15; }  VerificationResultCode verifySignature(VerificationContext context); VerificationErrorCode getErrorCode();  }
@Test public void testSignatureWithCorrectAggregationChainsAlgorithms_Ok() throws Exception { RuleResult result = rule.verify(build(TestUtil.loadSignature(SIGNATURE_2017_03_14))); Assert.assertNotNull(result); Assert.assertEquals(result.getResultCode(), VerificationResultCode.OK); Assert.assertNull(result.getErrorCode()); }
@Test public void testSignatureWithValidSha1AggregationChainsAlgorithms_Ok() throws Exception { RuleResult result = rule.verify(build(TestUtil.loadSignature(SIGNATURE_SHA1_AGGREGATION_LINK_OK))); Assert.assertNotNull(result); Assert.assertEquals(result.getResultCode(), VerificationResultCode.OK); Assert.assertNull(result.getErrorCode()); }
@Test public void testSignatureWithDeprecatedSha1AggregationChainsAlgorithms() throws Exception { RuleResult result = rule.verify(build(TestUtil.loadSignature(SIGNATURE_AGGREGATION_HASH_CHAIN_DEPRECATED_ALGORITHM))); Assert.assertEquals(result.getResultCode(), VerificationResultCode.FAIL); Assert.assertEquals(result.getErrorCode(), VerificationErrorCode.INT_15); }