Package org.sharpsw.crlserver.data

Examples of org.sharpsw.crlserver.data.RevokedCertificateCompositePrimaryKey


    CRLIssuer issuer = new CRLIssuer();
    issuer.setId("1111111111111111111111111111111111111111");
    issuer.setName("CN=AC Secretaria da Receita Federal do Brasil, O=ICP-Brasil, C=BR");
    issuer.setDescription("AC Secretaria da Receita Federal do Brasil");
   
    RevokedCertificateCompositePrimaryKey pk = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("11223344"));
    RevokedCertificate certificate = new RevokedCertificate(pk);
   
    Calendar ts = Calendar.getInstance();
    ts.set(Calendar.YEAR, 2012);
    ts.set(Calendar.MONTH, Calendar.MARCH);
View Full Code Here


    CRLIssuer issuer = new CRLIssuer();
    issuer.setId("1111111111111111111111111111111111111111");
    issuer.setName("CN=AC Secretaria da Receita Federal do Brasil, O=ICP-Brasil, C=BR");
    issuer.setDescription("AC Secretaria da Receita Federal do Brasil");

    RevokedCertificateCompositePrimaryKey key1 = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("11223344"));
    RevokedCertificate cert1 = new RevokedCertificate(key1);
   
    RevokedCertificateCompositePrimaryKey key2 = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("22334455"));
    RevokedCertificate cert2 = new RevokedCertificate(key2);
   
    Calendar ts1 = Calendar.getInstance();
    ts1.set(Calendar.YEAR, 2011);
    ts1.set(Calendar.MONTH, Calendar.JUNE);
View Full Code Here

  public void testFindRevokedCertificateByPrimaryKeyOK() throws ReadException {
    CRLIssuer issuer = new CRLIssuer();
    issuer.setId("1111111111111111111111111111111111111111");
    issuer.setName("CN=AC Secretaria da Receita Federal do Brasil, O=ICP-Brasil, C=BR");
   
    RevokedCertificateCompositePrimaryKey pk = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("11223344"));
    RevokedCertificate certificate = this.service.findByPrimaryKey(pk);
   
    RevokedCertificate expected = new RevokedCertificate();
    expected.setPrimaryKey(new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("11223344")));
    expected.setRevocationReason("UserRequest");
    Calendar ts = Calendar.getInstance();
    ts.set(Calendar.YEAR, 2012);
    ts.set(Calendar.MONTH, Calendar.JANUARY);
    ts.set(Calendar.DATE, 1);
View Full Code Here

    Assert.assertEquals(expected, certificate);
  }
 
  @Test(expected = IllegalArgumentException.class)
  public void testFindRevokedCertificateNullArgFail() throws ReadException {
    RevokedCertificateCompositePrimaryKey pk = null;
    this.service.findByPrimaryKey(pk);
  }
View Full Code Here

    CRLIssuer issuer = new CRLIssuer();
    issuer.setId("1111111111111111111111111111111111111111");
    issuer.setName("CN=AC Secretaria da Receita Federal do Brasil, O=ICP-Brasil, C=BR");
   
    RevokedCertificate certificate = new RevokedCertificate();
    RevokedCertificateCompositePrimaryKey pk = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("11223344"));
    certificate.setPrimaryKey(pk);
   
    Calendar ts = Calendar.getInstance();
    ts.set(Calendar.YEAR, 2011);
    ts.set(Calendar.MONTH, Calendar.DECEMBER);
View Full Code Here

    CRLIssuer issuer = new CRLIssuer();
    issuer.setId("1111111111111111111111111111111111111111");
    issuer.setName("CN=AC Secretaria da Receita Federal do Brasil, O=ICP-Brasil, C=BR");
   
    RevokedCertificate certificate = new RevokedCertificate();
    RevokedCertificateCompositePrimaryKey pk = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("11223344"));
    certificate.setPrimaryKey(pk);
   
    Calendar ts = Calendar.getInstance();
    ts.set(Calendar.YEAR, 2011);
    ts.set(Calendar.MONTH, Calendar.DECEMBER);
View Full Code Here

    CRLIssuer issuer = new CRLIssuer();
    issuer.setId("1111111111111111111111111111111111111111");
    issuer.setName("CN=AC Secretaria da Receita Federal do Brasil, O=ICP-Brasil, C=BR");
   
    RevokedCertificate certificate = new RevokedCertificate();
    RevokedCertificateCompositePrimaryKey pk = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("11223344"));
    certificate.setPrimaryKey(pk);
   
    this.service.delete(certificate);
   
    StringBuffer dataSetFile = new StringBuffer();
View Full Code Here

  public void testBulkDeleteOK() throws Exception {
    CRLIssuer issuer = new CRLIssuer();
    issuer.setId("1111111111111111111111111111111111111111");
    issuer.setName("CN=AC Secretaria da Receita Federal do Brasil, O=ICP-Brasil, C=BR");
   
    RevokedCertificateCompositePrimaryKey pk1 = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("11223344"));
    RevokedCertificate cert1 = new RevokedCertificate(pk1);
   
    RevokedCertificateCompositePrimaryKey pk2 = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("22334455"));
    RevokedCertificate cert2 = new RevokedCertificate(pk2);
   
    RevokedCertificateCompositePrimaryKey pk3 = new RevokedCertificateCompositePrimaryKey(issuer, new BigInteger("11224433"));
    RevokedCertificate cert3 = new RevokedCertificate(pk3);
   
    Set<RevokedCertificate> certs = new HashSet<RevokedCertificate>();
    certs.add(cert1);
    certs.add(cert2);
View Full Code Here

TOP

Related Classes of org.sharpsw.crlserver.data.RevokedCertificateCompositePrimaryKey

Copyright © 2018 www.massapicom. 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.