X509Extension ext = (X509Extension)req.getRequestExtensions().getExtension(id_pkix_ocsp_nonce); if (null != ext) { Hashtable table = new Hashtable(); Vector vec = null; table.put(id_pkix_ocsp_nonce, ext); X509Extensions exts = new X509Extensions(table); res.setResponseExtensions(exts);
X509Extensions reqexts = req.getRequestExtensions(); if (reqexts != null) { X509Extension ext = (X509Extension)reqexts.getExtension(id_pkix_ocsp_nonce); if (null != ext) { Hashtable table = new Hashtable(); Vector vec = null; table.put(id_pkix_ocsp_nonce, ext); X509Extensions exts = new X509Extensions(table); res.setResponseExtensions(exts); }
    protected BasicOCSPRespGenerator createOCSPResponse(OCSPReq req, X509Certificate cacert) throws OCSPException {        if (null == req) {            throw new IllegalArgumentException();        }        BasicOCSPRespGenerator res = new BasicOCSPRespGenerator(cacert.getPublicKey());		DERObjectIdentifier id_pkix_ocsp_nonce = new DERObjectIdentifier(OCSPObjectIdentifiers.pkix_ocsp + ".2");        X509Extension ext = (X509Extension)req.getRequestExtensions().getExtension(id_pkix_ocsp_nonce);        if (null != ext) {            Hashtable table = new Hashtable();            Vector vec = null;            table.put(id_pkix_ocsp_nonce, ext);			X509Extensions exts = new X509Extensions(table);             res.setResponseExtensions(exts);        }        return res;    }