Examples of CertifiedKeyPair


Examples of com.novosec.pkix.asn1.cmp.CertifiedKeyPair

        assertNotNull(resp);
        assertEquals(resp.getCertReqId().getValue().intValue(), requestId);
        PKIStatusInfo info = resp.getStatus();
        assertNotNull(info);
        assertEquals(0, info.getStatus().getValue().intValue());
        CertifiedKeyPair kp = resp.getCertifiedKeyPair();
        assertNotNull(kp);
        CertOrEncCert cc = kp.getCertOrEncCert();
        assertNotNull(cc);
        X509CertificateStructure struct = cc.getCertificate();
        assertNotNull(struct);
        checkDN(userDN, struct.getSubject());
        assertEquals(CertTools.stringToBCDNString(struct.getIssuer().toString()), CertTools.getSubjectDN(cacert));
View Full Code Here

Examples of com.novosec.pkix.asn1.cmp.CertifiedKeyPair

            }
            if ( info.getStatus().getValue().intValue()!=0 ) {
                StressTest.this.performanceTest.getLog().error("Received Status is "+info.getStatus().getValue().intValue()+" but should be 0");
                return null;
            }
            final CertifiedKeyPair kp = resp.getCertifiedKeyPair();
            if ( kp==null ) {
                StressTest.this.performanceTest.getLog().error("No CertifiedKeyPair for certificate received.");
                return null;
            }
            final CertOrEncCert cc = kp.getCertOrEncCert();
            if ( cc==null ) {
                StressTest.this.performanceTest.getLog().error("No CertOrEncCert for certificate received.");
                return null;
            }
            final X509CertificateStructure struct = cc.getCertificate();
View Full Code Here

Examples of com.novosec.pkix.asn1.cmp.CertifiedKeyPair

          PKIStatusInfo myPKIStatusInfo = new PKIStatusInfo(new DERInteger(0)); // 0 = accepted
          CertResponse myCertResponse = new CertResponse(new DERInteger(requestId), myPKIStatusInfo);
         
          X509CertificateStructure struct = X509CertificateStructure.getInstance(new ASN1InputStream(new ByteArrayInputStream(cert.getEncoded())).readObject());
          CertOrEncCert retCert = new CertOrEncCert(struct, 0);
          CertifiedKeyPair myCertifiedKeyPair = new CertifiedKeyPair(retCert);
          myCertResponse.setCertifiedKeyPair(myCertifiedKeyPair);
          //myCertResponse.setRspInfo(new DEROctetString(new byte[] { 101, 111, 121 }));
         
          CertRepMessage myCertRepMessage = new CertRepMessage(myCertResponse);
         
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.