X509Name proxyDN = req.getCertificationRequestInfo().getSubject();
X500Principal userDN = cert.getSubjectX500Principal();
ByteArrayInputStream bIn = new ByteArrayInputStream(
userDN.getEncoded());
DERInputStream dIn = new DERInputStream(bIn);
ASN1Sequence seq = (ASN1Sequence) dIn.readObject();
X509Name uDN = new X509Name(seq);
Log.debug(CLASS_NAME,
"user's subjectDN: " + uDN.toString()
+ "\nproxy's subjectDN: " + proxyDN.toString());