Certificate Parser
The Certificate Parser is implemented as Class CertificateParser in Objects AloahaCSP and AloahaCertInstaller. To access this object you have to reference the object or use it for example like:
for example createobject("AloahaCertInstaller.certparser")
Please find below a list of functions in pseudo language notation. A more complete list is available on request.
Function info() As Long
'always returns 1
End Function
Sub show()
'displays certificated loaded by LoadCertificateToMemory
End Sub
Function LoadCertificateToMemory(ByVal inputcert As Variant, PropertiesInclHeader As Boolean) As Boolean
'inputcert could be of following types
'inputcert() as byte
'inputcert as string
'if inputcert is string it should be HEX or BASE64 encoded
'PropertiesInclHeader defines if inbuild ASN.1 parser included or excludes header
End Function
Property Get serialnumber(ByVal asString As Boolean) As Variant
'returns serialnumber
'if asString = true then it returns it as string. Otherwise as byte array
End Property
Property Get fingerprint(ByVal asString As Boolean) As Variant
'returns fingerprint
'if asString = true then it returns it as string. Otherwise as byte array
End Property
Property Get SimpleSubject(ByVal asString As Boolean) As Variant
'returns simplesubject
'if asString = true then it returns it as string. Otherwise as byte array
End Property
Property Get subject(ByVal asString As Boolean) As Variant
'returns subject
'if asString = true then it returns it as string. Otherwise as byte array
End Property
Public Property Get SimpleIssuer(ByVal asString As Boolean) As Variant
'returns simpleissuer
'if asString = true then it returns it as string. Otherwise as byte array
End Property
Property Get issuer(ByVal asString As Boolean) As Variant
'returns issuer
'if asString = true then it returns it as string. Otherwise as byte array
End Property
Property Get TBSCertificateBA() As Variant
'returns the Certificate core as byte array (ASN.1)
End Property
Property Get TBSSubjectBA() As Variant
'returns the Subject byte array (ASN.1)
End Property
Property Get TBSIssuerBA() As Variant
'returns the Issuer byte array (ASN.1)
End Property
Public Property Get TBSValidityBA() As Variant
'returns the validity byte array (ASN.1)
End Property
Aloaha Software / Knowledge Base / Smart Card API / Aloaha CSP API / Certificate Parser