Examples of MockX509CRL


Examples of org.jasig.cas.adaptors.x509.util.MockX509CRL

      // Expect expired for zero leniency on CRL expiring 1ms ago
      final ThresholdExpiredCRLRevocationPolicy zeroThreshold = new ThresholdExpiredCRLRevocationPolicy();
      zeroThreshold.setThreshold(0);
      params.add(new Object[] {
          zeroThreshold,
          new MockX509CRL(issuer, oneHourAgo, new Date(now.getTime() - 1)),
          new ExpiredCRLException("CN=CAS", new Date()),
      });
     
      // Test case #2
      // Expect expired for 1h leniency on CRL expired 1 hour 1ms ago
      final ThresholdExpiredCRLRevocationPolicy oneHourThreshold = new ThresholdExpiredCRLRevocationPolicy();
      oneHourThreshold.setThreshold(3600);
      params.add(new Object[] {
          oneHourThreshold,
          new MockX509CRL(issuer, twoHoursAgo, new Date(oneHourAgo.getTime() - 1)),
          new ExpiredCRLException("CN=CAS", new Date()),
      });
     
      // Test case #3
      // Expect valid for 1h leniency on CRL expired 30m ago
      params.add(new Object[] {
          oneHourThreshold,
          new MockX509CRL(issuer, twoHoursAgo, halfHourAgo),
          null,
      });

      return params;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.