Code example for X509Certificate

Methods: getSubjectX500Principal

0
     * getSubjectX500Principal() method testing. 
     */ 
    public void testGetSubjectX500Principal() { 
        assertEquals("Incorrect subject", 
                new X500Principal(subjectName), 
                certificate.getSubjectX500Principal());
    } 
     
    /** 
     * 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",