Examples of ICertificateCache


Examples of org.ejbca.core.protocol.certificatestore.ICertificateCache

        OCSPReq req = gen.generate("SHA1WithRSA", keys.getPrivate(), chain, "BC");

        // First test with a signed OCSP request that can be verified
        Collection<Certificate> cacerts = new ArrayList<Certificate>();
        cacerts.add(cacert);
        ICertificateCache certcache = CertificateCacheTstFactory.getInstance(cacerts);
        X509Certificate signer = OCSPUtil.checkRequestSignature("127.0.0.1", req, certcache);
        assertNotNull(signer);
        assertEquals(ocspTestCert.getSerialNumber().toString(16), signer.getSerialNumber().toString(16));

        // Try with an unsigned request, we should get a SignRequestException
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.