Package org.ejbca.core.protocol

Examples of org.ejbca.core.protocol.PKCS10RequestMessage.verify()


   
    public void test05KeyToolP10() throws Exception {
        log.trace(">test05KeyToolP10()");
        PKCS10RequestMessage msg = new PKCS10RequestMessage(keytoolp10);

        boolean ret = msg.verify();
        assertTrue(ret);
        String dn = msg.getRequestDN();
        log.debug("DN: " + dn);
        assertEquals("CN=Test,O=AnaTom,C=SE", dn);
        String pwd = msg.getPassword();
View Full Code Here


    public void test06OldBCP10() throws Exception {
        log.trace(">test06OldBCP10()");
        PKCS10RequestMessage msg = new PKCS10RequestMessage(oldbcp10);

        boolean ret = msg.verify();
        assertTrue(ret);
        String dn = msg.getRequestDN();
        log.debug("DN: " + dn);
        assertEquals("C=SE,O=AnaTom,CN=Test", dn);
        String pwd = msg.getPassword();
View Full Code Here

    }
    public void test07IEP10() throws Exception {
        log.trace(">test07IEP10()");
        PKCS10RequestMessage msg = new PKCS10RequestMessage(iep10);

        boolean ret = msg.verify();
        assertTrue(ret);
        String dn = msg.getRequestDN();
        log.debug("DN: " + dn);
        assertEquals("CN=6AEK347fw8vWE424", dn);
        String pwd = msg.getPassword();
View Full Code Here

    public void test08AltNameP10() throws Exception {
     
      // P10 generated with openssl
        PKCS10RequestMessage msg = new PKCS10RequestMessage(altnamep10);

        boolean ret = msg.verify();
        assertTrue(ret);
        String dn = msg.getRequestDN();
        assertEquals("C=AU,CN=asd,E=asd@sdf.se", dn);
        String pwd = msg.getPassword();
        assertEquals("dsfsdf", pwd);
View Full Code Here

        assertNotNull(request);
        PKCS10RequestMessage msg = RequestMessageUtils.genPKCS10RequestMessage(request);
        assertNotNull(msg);
        CAInfo info = caAdminSessionRemote.getCAInfo(intAdmin, getAdminCAName());
        assertEquals(info.getSubjectDN(), msg.getRequestDN());
        assertTrue(msg.verify());
        // System.out.println(ASN1Dump.dumpAsString(msg.getCertificationRequest()));

        /*
         * First test is to renew a CA signed by an external CA *without
         * renewing the keys*. This just creates a new certificate request,
View Full Code Here

                    retval = new ExtRAResponse(submessage.getRequestId(),false,authok);
                    return retval;                                       
                }
                String signok = null;
                try {
                    if (!signPkcs10.verify(signcert.getPublicKey())) {
                        signok = "Verify failed for signature request";
                    }                   
                } catch (Exception e) {
                    signok="Error verifying signaturerequest: "+e.getMessage();
                    log.error("Error verifying signaturerequest: ", e);
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.