Community articleGetSigningCert 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 retrieves the signing certificate from a signature object.


   Function GetSigningCert() As Certificate


There are no parameters for this function.


The signing 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  ' Variant
      ' 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:
Signature functions