I am using "java.security.cert.X509Certificate" for the first time. I want to get CN, OU, O from a certificate, (DN names).
When I use "getIssuerDN()" method it is giving me entire string.
My question is how to parse each value from this string?.
Thanks in advance, Mubeen.
Sun Certified Java Programmer
posted 7 years ago
I do a lot of work with dn's. So, should be delimited, somehow - my experience is the delimiter is usually a , or a /. You could Split on that and then you'd have an String array (String  ldapStruct.
your name should be in ldapStruct and your root node should be in ldapStruct.length -1.