DERInputStream in = new DERInputStream(new ByteArrayInputStream(buffer));
ASN1InputStream in = new ASN1InputStream(new ByteArrayInputStream(buffer));
    public byte[] nsCertRequest(ISignSessionRemote signsession, byte[] reqBytes, String username,        String password) throws Exception {        byte[] buffer = Base64.decode(reqBytes);        if (buffer == null) {            return null;        }        DERInputStream in = new DERInputStream(new ByteArrayInputStream(buffer));        ASN1Sequence spkac = (ASN1Sequence) in.readObject();        in.close();        NetscapeCertRequest nscr = new NetscapeCertRequest(spkac);        // Verify POPO, we don't care about the challenge, it's not important.        nscr.setChallenge("challenge");        if (nscr.verify("challenge") == false) {            throw new SignRequestSignatureException(                "Invalid signature in NetscapeCertRequest, popo-verification failed.");        }        log.debug("POPO verification successful");        X509Certificate cert = (X509Certificate) signsession.createCertificate(administrator,                username, password, nscr.getPublicKey());        //Certificate[] chain = ss.getCertificateChain();        byte[] pkcs7 = signsession.createPKCS7(administrator, cert);        log.debug("Created certificate (PKCS7) for " + username);        debug.print("<h4>Generated certificate:</h4>");        debug.printInsertLineBreaks(cert.toString().getBytes());        return pkcs7;    } //nsCertRequest