I get exceptions when trying to parse a CRLDistributionPointsExtension object since I need to find the directory location of the CRL.
My code looks something like this:
 
CRLDistributionPointsExtension cdpExt = null;
foreach( X509Extension xe in x509.Extensions )
{
  if( xe.Oid != "2.5.29.31" )
    continue;
  cdpExt = new CRLDistributionPointsExtension( xe );
  break;
}
 
if(cdpExt == null)
  throw new CryptographicException("No cRLDistributionPoint extension found in certificate.");
 
// Testing
string xx = cdpExt.Oid;      // Works just fine
xx = cdpExt.Name;           // Works just fine
xx = cdpExt.ToString();    // !!!!!!!!! Throws exception
The following exception is thrown:
 
An unhandled exception of type 'System.NullReferenceException' occurred in mono.security.dll
Additional information: Object reference not set to an instance of an object.
Any idea what I can do to make this work?
 
Med venlig hilsen / Best regards
 
Kim Hellan
KMD / Sikkerhed
Mailto:[EMAIL PROTECTED]
 




___________________________________________________________________
www.kmd.dk www.kundenet.kmd.dk www.eboks.dk www.civitas.dk www.netborger.dk

Hvis du har modtaget denne mail ved en fejl vil jeg gerne, at du informerer mig og sletter den.
KMD skaber it-services, der fremmer effektivitet hos det offentlige, erhvervslivet og borgerne.

If you received this e-mail by mistake, please notify me and delete it. Thank you.
Our mission is to enhance the efficiency of the public sector and improve its service of the general public.

Reply via email to