CryptoSys PKI Toolkit Manual

Example: X509.KeyUsageOptions  X509.MakeCertSelf  X509.Options 

[VB6 equivalent: X509_MakeCertSelf]

Dim nRet As Integer
Dim kuoKeyUsage As X509.KeyUsageOptions
Dim strDN As String

' Specify DN using chinese characters in UTF-8
' CN=da wei (U+5927, U+536B)
' C=zhong guo (U+4E2D, U+56FD)
strDN = "CN=#xE5A4A7E58DAB,C=#xe4b8ade59bbd"
kuoKeyUsage = X509.KeyUsageOptions.DigitalSignature _
    Or X509.KeyUsageOptions.KeyCertSign Or X509.KeyUsageOptions.CrlSign
nRet = X509.MakeCertSelf("myca-chinadavid.cer", "myca.epk", _
    &H888, 4, strDN, "", kuoKeyUsage, "password", X509.Options.UTF8String)
If nRet <> 0 Then
    Console.WriteLine(nRet & " " & General.LastError())
Else
    Console.WriteLine("Success")
End If

See Also:
X509.MakeCertSelf Method

[Contents] [Index]

[HOME]   [NEXT: Example: X509.MakeCRL ...]

Copyright © 2004-12 D.I. Management Services Pty Ltd. All rights reserved.