Community articleUFLGetSignatureVerificationStatus function
Added by IBM contributorIBM on May 2, 2012
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

No abstract provided.



Description

When called, this function checks to see if the digital signatures in a given form are valid.

Function

   r_short UFLGetSignatureVerificationStatus(
      formNodeP theForm,
      r_short *validSigsFlagPtr
   );


Parameters

Table 1. Function parameters
ExpressionTypeDescription
theFormformNodePThe form in which to check the signatures.
validSigsFlagPtrr_short*A pointer to a location storing the results of whether the signatures are valid. It will be set to OK if all signatures are valid or to NOTOK if at least one signature is not valid.


Returns

OK on success or NOTOK on failure.
Additionally, the validSigsFlagPtr will contain one of the following values:
Table 2. return codes
CodeStatus
FormNodeP.UFL_SIGS_OKThe signatures are valid.
FormNodeP.UFL_SIGS_NOTOKOne or more signatures are broken.
FormNodeP.UFL_SIGS_UNVERIFIEDOne or more signatures are unverifiable.


Example

The following example uses UFLGetSignatureVerificationStatus to check if the signatures in a loaded form are valid. If any of the signatures are not valid, an error message is reported.
   r_error verifyForm(formNodeP form)
   {
   r_error error;
   r_short validFlag;
 
      error = UFLGetSignatureVerificationStatus(form, &validFlag);
      if (error != OK)
      {
         fprintf(stderr, "UFLGetSignatureVerificationStatus error %hd.\n",
            error);
         return(NOTOK);
      }
      if (validFlag != UFL_SIGS_OK)
      {
         fprintf(stderr, "At least one signature in form not valid");
      }
      return(OK);
   }


Parent topic:
FormNodeP functions