@Override public TimeConstraint getRevocationFreshnessConstraint() { RevocationConstraints revocationConstraints = policy.getRevocation(); if (revocationConstraints != null) { return revocationConstraints.getRevocationFreshness(); } return null; }
RevocationConstraints revocationConstraints = policy.getRevocation(); if (revocationConstraints != null) { return revocationConstraints.getBasicSignatureConstraints();
@Test public void testUnmarshalConstraint() throws Exception { ConstraintsParameters constraintsParameters = unmarshal(new File("src/test/resources/constraint.xml")); RevocationConstraints revocation = constraintsParameters.getRevocation(); assertNotNull(revocation); TimeConstraint revocationFreshness = revocation.getRevocationFreshness(); assertNotNull(revocationFreshness); assertEquals(Level.FAIL, revocationFreshness.getLevel()); assertEquals(TimeUnit.DAYS, revocationFreshness.getUnit()); assertNotNull(revocationFreshness.getValue()); assertEquals(0, revocationFreshness.getValue().intValue()); }