init commit

This commit is contained in:
2025-10-09 09:57:24 +09:00
commit 4d551bd74f
6636 changed files with 1218703 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
using System;
using Org.BouncyCastle.Asn1;
using Org.BouncyCastle.Asn1.Ocsp;
using Org.BouncyCastle.Asn1.X509;
namespace Org.BouncyCastle.Ocsp;
public class RevokedStatus : CertificateStatus
{
internal readonly RevokedInfo info;
public DateTime RevocationTime => info.RevocationTime.ToDateTime();
public bool HasRevocationReason => info.RevocationReason != null;
public int RevocationReason
{
get
{
if (info.RevocationReason == null)
{
throw new InvalidOperationException("attempt to get a reason where none is available");
}
return info.RevocationReason.Value.IntValue;
}
}
public RevokedStatus(RevokedInfo info)
{
this.info = info;
}
public RevokedStatus(DateTime revocationDate, int reason)
{
info = new RevokedInfo(new DerGeneralizedTime(revocationDate), new CrlReason(reason));
}
}