• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Get values from CA certificate.

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

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.
 
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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[0] and your root node should
be in ldapStruct.length -1.

John
 
reply
    Bookmark Topic Watch Topic
  • New Topic