Community articleGetIssuer function
Added by IBM contributorIBM on August 15, 2011
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.


This function extracts the issuer certificate from the certificate provided.


   Function GetIssuer(
      theStatus As Long
      ) As Certificate


Table 1. Function parameters
theStatusLongA long that is set with the status of the operation. This will be one of the following:
SUSTATUS_OK — The operation was successful.
SUSTATUS_CANCELLED— the operation was cancelled by the user.
SUSTATUS_INPUT_REQUIRED — the operation required user input, but could not receive it (for example, it was run on a server with no user).


The issuer certificate.


The following example gets the signing certificate from a signature object, then iterates through the certificate issuers until it reaches the end of the chain. During the iteration, each certificate is passed to a function that processes them.
   Sub processCertChain(TheSig)
      Dim TheCert, IssuerCert  ' ICertificate
      ' Get the signing certificate from the signature
      Set TheCert = TheSig.GetSigningCert()
      ' Loop through the certificate chain, passing each certificate to the 
      ' ProcessCert function. The loop ends when the issuer certificate is 
      ' Nothing.
      Do While (Not(TheCert Is Nothing))
         ' Pass the certificate to the ProcessCert function.  Note that 
         ' this is not an API function, but rather a function you would 
         ' write to process the certificate in some way.
         ' Get the issuer certificate from the TheCert
         Set IssuerCert = TheCert.GetIssuer(1) ' vbNull
         ' Assign theCert to equal the issuerCert for next iteration of the 
         ' loop.
         Set TheCert = IssuerCert
   End Sub

Parent topic:
Certificate functions