Solved

How to extract information from x509 Certificate?

Posted on 2004-09-17
8
1,321 Views
Last Modified: 2008-02-01
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
Comment
Question by:pleasure
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 12085589
0
 

Author Comment

by:pleasure
ID: 12085880
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
 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
ID: 12086013
0
Independent Software Vendors: 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!

 

Author Comment

by:pleasure
ID: 12086218
CEHJ,
It's new class in JDK 1.5?? do you know of any class that we can use for JDK 1.4??
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12086292
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 12086353
8-)
0
 

Author Comment

by:pleasure
ID: 12086354
CEHJ, thanks for the information
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12086379
Pleasure pleasure ;-)
0

Featured Post

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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 243
map related example 6 59
Which non-HTML GUI front end to use with Java? 3 52
How to fix  socket closed error 11 33
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question