/// <summary>
 /// Creates a Reason Code extension.
 /// </summary>
 /// <param name="reason">One of the <see cref="ReasonCodeExtension"/> values.</param>
 /// <returns>A <see cref="X509Extension"/> instance.</returns>
 public static X509Extension CreateReasonCodeExtension(ReasonCodeExtension reason)
 {
     IntegerEncodable value = new IntegerEncodable((int)reason);
     return new X509Extension(new Oid("2.5.29.21", "Reason Code"), value.ToArray(), false);
 }
 /// <summary>
 /// Creates a CRL Number extension.
 /// </summary>
 /// <param name="crlNumber">The number of the CRL.</param>
 /// <returns>A <see cref="X509Extension"/> instance.</returns>
 public static X509Extension CreateCRLNumberExtension(int crlNumber)
 {
     IntegerEncodable value = new IntegerEncodable(crlNumber);
     return new X509Extension(new Oid("2.5.29.20", "CRL Number"), value.ToArray(), false);
 }