[VB6 equivalent: X509_MakeCRL
]
Dim nRet As Integer Dim strCrlFile As String Dim strIssuerFile As String Dim strKeyFile As String Dim strPassword As String Dim strCertList As String Dim strExtension As String ' Create a new CRL dated with the current system time strCrlFile = "CarlsNew.crl" strIssuerFile = "CarlRSASelf.cer" strKeyFile = "CarlPrivRSASign.p8e" ' CAUTION: DO NOT HARD-CODE REAL PASSWORDS! strPassword = "password" strCertList = "1,2007-12-31, 2, 2009-12-31T12:59:59Z, 66000,2066-01-01, #x0102deadbeef,2010-02-28T01:01:59" nRet = X509.MakeCRL(strCrlFile, strIssuerFile, strKeyFile, strPassword, strCertList, "", SigAlgorithm.Default, 0) Console.WriteLine("X509_MakeCRL returns " & nRet & " (expected 0)") If (nRet = 0) Then Console.WriteLine("SUCCESS: New CRL file '" & strCrlFile & "' created.") Else Console.WriteLine("ERROR: " & General.ErrorLookup(nRet) & ": " & General.LastError()) End If ' Create another CRL using specified times (NB these are GMT times, not local) strExtension = "thisUpdate=2010-04-01T12:00;nextUpdate=2010-05-01" strCrlFile = "Carl_20100401.crl" nRet = X509.MakeCRL(strCrlFile, strIssuerFile, strKeyFile, strPassword, strCertList, strExtension, SigAlgorithm.Default, 0) Console.WriteLine("X509_MakeCRL returns " & nRet & " (expected 0)") If (nRet = 0) Then Console.WriteLine("SUCCESS: New CRL file '" & strCrlFile & "' created.") Else Console.WriteLine("ERROR: " & General.ErrorLookup(nRet) & ": " & General.LastError()) End If
See Also:
X509.MakeCRL Method