Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
The BSD License Copyright (c) 2010-2012 RIPE NCC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the RIPE NCC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 package net.ripe.rpki.commons.crypto.crl;
 
 import static net.ripe.rpki.commons.crypto.x509cert.X509CertificateBuilderHelper.*;
 import static org.junit.Assert.*;
 
 import org.junit.Test;
 
 public class X509CrlBuilderTest {
 
     private static final PublicKey PUBLIC_KEY = ..getPublic();
     private static final PrivateKey PRIVATE_KEY = ..getPrivate();
 
     private static final DateTime THIS_UPDATE_TIME = new DateTime(2007, 2, 28, 2, 53, 23, 0, .);
     private static final DateTime NEXT_UPDATE_TIME = new DateTime(2007, 3, 1, 2, 53, 23, 0, .);
     private static final DateTime REVOCATION_TIME = new DateTime(2007, 2, 25, 19, 23, 44, 123, .);
 
     private X509CrlBuilder subject;
     private X509Crl emptyCrl;
     private X509Crl nonEmptyCrl;
 
     @Before
     public void setUp() {
          = new X509CrlBuilder();
         .withIssuerDN(new X500Principal("CN=ROOT"));
         .withNumber(.);
          = .build();
          = .build();
     }
 
     @Test
     public void shouldHaveVesion2() {
     }
 
     @Test
     public void shouldHaveIssuer() {
         assertEquals(new X500Principal("CN=ROOT"), .getIssuer());
     }
 
     @Test
     public void shouldHaveUpdateTimes() {
     }
 
     @Test
     public void shouldUseSha256WithRsaEncryption() {
         assertEquals("SHA256withRSA".getSigAlgName());
     }
 
    @Test
    }
    @Test
        assertEquals(.entry.getSerialNumber());
    }
    @Test
        X509Crl crl = .build();
        assertEquals(2, crl.getRevokedCertificates().size());
    }
    @Test(expected=IllegalArgumentException.class)
    }
    @Test
        byte[] authorityKeyIdentifier = .getAuthorityKeyIdentifier();
        assertNotNull(authorityKeyIdentifier);
        assertArrayEquals(KeyPairUtil.getKeyIdentifier(), authorityKeyIdentifier);
    }
    @Test
    public void shouldHaveCrlNumberExtension() throws IOException {
    }
    @Test
        .verify();
        .verify();
    }
    @Test(expected=SignatureException.class)
    }
    @Test
    public void shouldBeSatisfiedByCrlWithSameEntries() {
    }
    @Test
        // Additional entries should not matter, since a revoked certificate can never be "unrevoked".
        // Entries only disappear when the original certificate expires, but this does not mean we need
        // to republish a CRL.
        .clearEntries();
    }
    @Test
        .addEntry(BigInteger.valueOf(42), new DateTime());
    }
New to GrepCode? Check out our FAQ X