Skip to Content.
Sympa Menu

mace-opensaml-users - RE: question certificate extensions

Subject: OpenSAML user discussion

List archive

RE: question certificate extensions


Chronological Thread 
  • From: "Christopher Brown" <>
  • To: <>, <>
  • Subject: RE: question certificate extensions
  • Date: Thu, 10 Nov 2005 09:00:10 -0500

Title: question certificate extensions

have you tried the bouncycastle library?

 

http://www.bouncycastle.org

 

 


From: [mailto:]
Sent: Thursday, November 10, 2005 5:24 AM
To:
Subject: question certificate extensions

 

 

Hi opensamlers,  :-)

I have a question that is probably "outside" the scope of opensaml, but maybe one of you knows the answer.
The problem is the following:
I have a X509 certificate with an extension "2.5.29.31" (CRLDistributionPoints), where there is a url to a given CRL.
when I do the following, I get:
byte[] extVal = cert.getExtensionValue("2.5.29.31");
String val = new String(extVal);
System.out.println("VALUE EXT = " + val);
// I get: VALUE EXT =


60402 0 .†,http://crl.eid.belgium.be/government2005.crl
DerValue der = new DerValue(extVal);
System.out.println("VALUE2 =" + new String(der.getOctetString()));
//I get: VALUE2 =0402 0 .†,http://crl.eid.belgium.be/government2005.crl
My question is obvously, if there is a nice way to get the url from the extension (without having to do pattern matching of the pattern "http"). In other words, I´m looking for some class that allows me to do something like:

//Extension is the name I chose for the class I´m looking for.
Extension ext = new Extension(extVal);
String url = "ext.getValue();

Thanks in advance,
Miro




Archive powered by MHonArc 2.6.16.

Top of Page