Solved

How to extract information from x509 Certificate?

Posted on 2004-09-17
8
1,307 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
  • 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
firstswap challenge 20 77
Basic Java Case or If-Else statement... 3 50
Java SE 8u111  Lot of stuff broke 11 69
Apps blocked by Java 9 79
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

770 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