public void testOutOfOrder() throws Exception { try { validator.validate(Lists.newArrayList( CertConstantUtil.INTERMEDIATE_PUB_CERT, CertConstantUtil.SERVER_PUB_CERT)); fail("Should have thrown, certs out of order"); } catch (SignatureException e) { // good } }
public void testOutOfOrder() throws Exception { try { validator.validate(Lists.newArrayList( CertConstantUtil.INTERMEDIATE_PUB_CERT, CertConstantUtil.SERVER_PUB_CERT)); fail("Should have thrown, certs out of order"); } catch (SignatureException e) { // good } }
public void testIncomplete() throws Exception { try { validator.validate(Lists.newArrayList(CertConstantUtil.SERVER_PUB_CERT)); fail("Should have thrown, cert chain incomplete."); } catch (SignatureException e) { // good } }
public void testIncomplete() throws Exception { try { validator.validate(Lists.newArrayList(CertConstantUtil.SERVER_PUB_CERT)); fail("Should have thrown, cert chain incomplete."); } catch (SignatureException e) { // good } }
public void testExpired() throws Exception { timeSource.advanceSeconds(1800L * 24 * 60 * 60); // 1800 days validator.validate(serverChain); timeSource.advanceSeconds(2000L * 24 * 60 * 60); // 2000 days try { validator.validate(serverChain); fail("Should have thrown, cert expired"); } catch (SignatureException e) { // good } }
public void testExpired() throws Exception { timeSource.advanceSeconds(1800L * 24 * 60 * 60); // 1800 days validator.validate(serverChain); timeSource.advanceSeconds(2000L * 24 * 60 * 60); // 2000 days try { validator.validate(serverChain); fail("Should have thrown, cert expired"); } catch (SignatureException e) { // good } }