You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.7 KiB
64 lines
1.7 KiB
#if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR) |
|
#pragma warning disable |
|
using System; |
|
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1; |
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp; |
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Crmf; |
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; |
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math; |
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Cmp |
|
{ |
|
public class RevocationDetailsBuilder |
|
{ |
|
private readonly CertTemplateBuilder _templateBuilder = new CertTemplateBuilder(); |
|
|
|
public RevocationDetailsBuilder SetPublicKey(SubjectPublicKeyInfo publicKey) |
|
{ |
|
if (publicKey != null) |
|
{ |
|
_templateBuilder.SetPublicKey(publicKey); |
|
} |
|
|
|
return this; |
|
} |
|
|
|
public RevocationDetailsBuilder SetIssuer(X509Name issuer) |
|
{ |
|
if (issuer != null) |
|
{ |
|
_templateBuilder.SetIssuer(issuer); |
|
} |
|
|
|
return this; |
|
} |
|
|
|
public RevocationDetailsBuilder SetSerialNumber(BigInteger serialNumber) |
|
{ |
|
if (serialNumber != null) |
|
{ |
|
_templateBuilder.SetSerialNumber(new DerInteger(serialNumber)); |
|
} |
|
|
|
return this; |
|
} |
|
|
|
public RevocationDetailsBuilder SetSubject(X509Name subject) |
|
{ |
|
if (subject != null) |
|
{ |
|
_templateBuilder.SetSubject(subject); |
|
} |
|
|
|
return this; |
|
} |
|
|
|
public RevocationDetails Build() |
|
{ |
|
return new RevocationDetails(new RevDetails(_templateBuilder.Build())); |
|
} |
|
} |
|
} |
|
#pragma warning restore |
|
#endif
|
|
|