} catch(CertificateEncodingException e) {
log.warn(e.toString()+" while retrieving subject from certificate to create CSR. Using subjectDN instead.");
subject = new X509Name(cert.getSubjectDN().toString());
}
PublicKey publicKey = cert.getPublicKey();
ASN1Set attributes = null;
PKCS10CertificationRequest csr = new PKCS10CertificationRequest(sigalg,
subject, publicKey, attributes, signingKey);
if (!csr.verify()) {