• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1470
  • Last Modified:

How to extract information from x509 Certificate?

hi all,
I wish to extract information from x509Certificate, I know that we can retrieve such as certificate serial number, version subjectDN from the available API.

Is there any API available for us to retrieve information such as Common Name, Oraganization Unit, Locality etc? or we need to develop our own program to parse the information??

Please guide..thanks

0
pleasure
Asked:
pleasure
  • 5
  • 3
1 Solution
 
pleasureAuthor Commented:
CEHJ,
X509Certificate has a method called getSubjectDN which will return the certificate's subject distinguished name. Subject DN normally will contain string like 'CN=www.experts-exchange.com.my, OU=Organization Unit, O=Oragnization'

My question is, is there any available API for us to parse 'CN=www.experts-exchange.com, OU=Organization Unit, O=Oragnization' ? For example, when I wish to get the value for CN, the API will return me 'www.experts-exchange.com'.

Is it we need to develop the program ourself?


0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
pleasureAuthor Commented:
CEHJ,
It's new class in JDK 1.5?? do you know of any class that we can use for JDK 1.4??
0
 
CEHJCommented:
Sorry - didn't notice that. Anything that implements the Name interface (since 1.3) should help. You might have to do a little hand-parsing yourself too
0
 
CEHJCommented:
8-)
0
 
pleasureAuthor Commented:
CEHJ, thanks for the information
0
 
CEHJCommented:
Pleasure pleasure ;-)
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now