Member since Mar 18, 2009, follows 0 people, 1 public groups, 2994 public bookmarks (4042 total).
More »
Tags
More »
Recent Bookmarks and Annotations
-
bouncycastle.org :: dev-crypto-csharp :: [dev-crypto-csharp] CRL distribution points and CRL reason codes on 2009-04-08
-
- 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
[dev-crypto-csharp] CRL distribution points and CRL reason codes
<!--X-Subject-Header-End--><!--X-Head-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); - To: <dev-crypto-csharp@bouncycastle.org>
-
-
Smashing Magazine on 2009-04-03
-
to spread knowedge and present only the best design practices and development
techniques. However, sometimes
-
- UML and Software Architecture on 2009-01-02
- Periodic execution in .NET C# on 2009-01-02
- Spring Java on 2009-01-02
- Winforms on 2009-01-02
- Praktyka na InfoQ on 2009-01-02
- Hard working and practice on 2009-01-02
- Faq on WinForm on 2009-01-02
- Is Linux really worth $10.8 billion? | Open Source | ZDNet.com on 2008-10-23
Diigo is about better ways to research, share and collaborate on information. Learn more »
Join Diigo