Code example for X509Certificate

Methods: getNotBefore

0
    /** 
     * getNotBefore() method testing. 
     */ 
    public void testGetNotBefore() { 
        assertEquals("Incorrect notBefore date",
                new Date(notBefore), certificate.getNotBefore());
    } 
     
    /** 
     * getNotAfter() method testing. 
     */ 
    public void testGetNotAfter() { 
        assertEquals("Incorrect notAfter date",
                new Date(notAfter), certificate.getNotAfter());
    } 
     
    public static void printAsHex(int perLine, String prefix, 
                                        String delimiter, byte[] data) {
        for (int i=0; i<data.length; i++) {
            String tail = Integer.toHexString(0x000000ff & data[i]);
            if (tail.length() == 1) {