Skip to main content

marekw Wawrzynczyk's Library tagged no_tag   View Popular

08 Apr 09

bouncycastle.org :: dev-crypto-csharp :: [dev-crypto-csharp] CRL distribution points and CRL reason codes

    • [dev-crypto-csharp] CRL distribution points and CRL reason codes

      <!--X-Subject-Header-End--><!--X-Head-of-Message-->
      • To: <dev-crypto-csharp@bouncycastle.org>

      • Subject: [dev-crypto-csharp] CRL distribution points and CRL reason
        codes
      • From: "Danny Heijl" <Danny.Heijl@cevi.be>
      • Date: Mon, 23 Mar 2009 16:07:48 +0100
      • List-id: <dev-crypto-csharp@bouncycastle.org>
      • Thread-index: AcmrySCVddM3IQBhQt6rf2oG+511uA==
      • Thread-topic: CRL distribution points and CRL reason codes
      <!--X-Head-of-Message-End--><!--X-Head-Body-Sep-Begin--><!--X-Head-Body-Sep-End--><!--X-Body-of-Message-->
      I recently needed to access the CRL distribution point from an X509
      certificate and the reason code from a CRL.

      I used the following extension methods:

      /*+++++++++ start code ++++++++++++*/

      using Org.BouncyCastle.X509;
      using Org.BouncyCastle.X509.Extension;

      namespace Org.BouncyCastle.Asn1.X509 {

      public enum CrlReasonCode {
      Unspecified=0,
      KeyCompromise=1,
      CACompromise=2,
      AffiliationChanged=3,
      Superseded=4,
      CessationOfOperation=5,
      CertificateHold=6,
      Unknown=7,
      RemoveFromCRL=8,
      PrivilegeWithdrawn=9,
      AACompromise=10
      }

      public static class MyCrlExtensions {

      /// <summary>
      /// Gets the reason code enumeration value from the
      X509CrlEntry.
      /// </summary>
      /// <param name="ce">The X509 CRL entry instance.</param>
      /// <returns>A reason code enum value</returns>
      public static CrlReasonCode GetReasonCode(this X509CrlEntry ce)
      {

      CrlReasonCode Result = CrlReasonCode.Unspecified;

      if (ce.HasExtensions) {
      Asn1OctetString os =
      ce.GetExtensionValue(X509Extensions.ReasonCode);
      if (os != null) {
      Asn1Object ob =
      X509ExtensionUtilities.FromExtensionValue(os);
03 Apr 09

Smashing Magazine

  • to spread knowedge and present only the best design practices and development
    techniques. However, sometimes
10 Oct 08

BetaNews | Inside Information; Unreleased Products

  • Avant Browser 9.02 Build 017 April 16 - 4:52 PM
    Avant Browser is a custom Web browser application based on Internet Explorer with versatile multi-window support. It allows users to browse multiple Web sites simultaneously and block all unwanted pop-up pages. All opened pages can be easily stopped, refreshed, closed or arranged with one click. The integrated cleaner helps users to clear all traces and keep privacy. The built-in Google search engine enables users to easily search for Web pages and images.
    User Rating: 4.2
    View ChangesLicense: Freeware
    More Information
  • Avant Browser 9.02 Build 017 April 16 - 4:52 PM
    Avant Browser is a custom Web browser application based on Internet Explorer with versatile multi-window support. It allows users to browse multiple Web sites simultaneously and block all unwanted pop-up pages. All opened pages can be easily stopped, refreshed, closed or arranged with one click. The integrated cleaner helps users to clear all traces and keep privacy. The built-in Google search engine enables users to easily search for Web pages and images.
    User Rating: 4.2
    View ChangesLicense: Freeware
    More Information
1 - 20 of 2985 Next › Last »
Showing 20 items per page

Diigo is about better ways to research, share and collaborate on information. Learn more »

Join Diigo