Community articlegetSigningCert method
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars


This method retrieves the signing certificate from a signature object.


   public Certificate getSigningCert() throws UWIException;


There are no parameters for this method.


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 method that processes them.
   public void processCertChain(Signature theSig)
   Certificate theCert, issuerCert;
   IntHolder theStatus;
      /* Get the signing certificate from the signature. */
      theCert = theSig.getSigningCert();
      /* Loop through the certificate chain, passing each certificate to the 
         ProcessCert function. The loop ends when the issuer certificate is 
         null. */
      while (theCert != null)
         /* Pass the certificate to the processCert method.  Note that 
            this is not an API method, but rather a method you would 
            write to process the certificate in some way. */
         /* Get the issuer certificate from theCert. */
         issuerCert = theCert.getIssuer(theStatus);
         /* Check to ensure the method exited with the correct status. */
         if (theStatus.value != SecurityUserStatusType.SUSTATUS_OK)
            throw new UWIException("getBlob exited with the wrong status.");
         /* Assign theCert to equal the issuerCert for next iteration of the 
            loop. */
         theCert = issuerCert;

Parent topic:
Signature class