Package net.sf.ehcache

Examples of net.sf.ehcache.Cache.initialise()


      zeroThresholdPolicy.setThreshold(0);
     
      // Test case #1
      // Valid certificate on valid CRL data
      cache = new Cache("crlCache-1", 100, false, false, 20, 10);
      cache.initialise();
      params.add(new Object[] {
          new CRLDistributionPointRevocationChecker(cache),
          defaultPolicy,
          new String[] {"user-valid-distcrl.crt"},
         "userCA-valid.crl",
View Full Code Here


      });
     
      // Test case #2
      // Revoked certificate on valid CRL data
      cache = new Cache("crlCache-2", 100, false, false, 20, 10);
      cache.initialise();
      params.add(new Object[] {
          new CRLDistributionPointRevocationChecker(cache),
          defaultPolicy,
          new String[] {"user-revoked-distcrl.crt"},
         "userCA-valid.crl",
View Full Code Here

      });
     
      // Test case #3
      // Valid certificate on expired CRL data
      cache = new Cache("crlCache-3", 100, false, false, 20, 10);
      cache.initialise();
      params.add(new Object[] {
          new CRLDistributionPointRevocationChecker(cache),
          zeroThresholdPolicy,
          new String[] {"user-valid-distcrl.crt"},
         "userCA-expired.crl",
View Full Code Here

     
      // Test case #4
      // Valid certificate on expired CRL data with custom expiration
      // policy to always allow expired CRL data
      cache = new Cache("crlCache-4", 100, false, false, 20, 10);
      cache.initialise();
      params.add(new Object[] {
          new CRLDistributionPointRevocationChecker(cache),
          new RevocationPolicy<X509CRL>() {
              public void apply(X509CRL crl) {/* Do nothing to allow unconditionally */}
          },
View Full Code Here

     
      // Test case #5
      // Valid certificate with no CRL distribution points defined but with
      // "AllowRevocationPolicy" set to allow unavailable CRL data
      cache = new Cache("crlCache-5", 100, false, false, 20, 10);
      cache.initialise();
      final CRLDistributionPointRevocationChecker checker5 = new CRLDistributionPointRevocationChecker(cache);
      checker5.setUnavailableCRLPolicy(new AllowRevocationPolicy());
      params.add(new Object[] {
          checker5,
          defaultPolicy,
View Full Code Here

      // Revoked certificate with CRL distribution point URI that is technically
      // not a valid URI since the issuer DN in the querystring is not encoded per
      // the escaping of reserved characters in RFC 2396.
      // Make sure we can convert given URI to valid URI and confirm it's revoked
      cache = new Cache("crlCache-6", 100, false, false, 20, 10);
      cache.initialise();
      params.add(new Object[] {
          new CRLDistributionPointRevocationChecker(cache),
          defaultPolicy,
          new String[] {"user-revoked-distcrl2.crt"},
         "userCA-valid.crl",
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.