Community articleUFLIsDigitalSignaturesAvailable function
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

Description

This function determines whether digital signatures are available on the current computer.

Function

   r_short UFLIsDigitalSignaturesAvailable(
   r_short *availableFlagPtr);


Parameters

Table 1. is digital signature available parameters
ExpressionTypeDescription
availableFlagPtrr_short*A pointer that contains OK if digital signatures are available and NOTOK if digital signatures are not available.


Returns

OK on success or an error code on failure.

Example

In the following example, UFLDereferenceEx is used to locate the digital signature button in the form. UFLIsDigitalSignaturesAvailable is then used to determine whether or not digital signatures are supported; if they aren't, the signature button is removed.
   r_error checkSignatureButton(formNodeP form)
   {
   r_error error;
   r_short sigsAvail;
   formNodeP tempNode;
 
      error = UFLIsDigitalSignaturesAvailable(&sigsAvail);
      if (error != OK)
      {
         fprintf(stderr, "UFLIsDigitalSignaturesAvailable error %hd.\n", 
            error);
         return(NOTOK);
      }
      if (sigsAvail == NOTOK)
      {
         if ((tempNode = UFLDereferenceEx(form, NULL, "PAGE1.SIGNBUTTON", 
            0, UFL_ITEM_REFERENCE, NULL)) == NULL)
         {
            fprintf(stderr, "Could not locate SIGNBUTTON node.\n");
            return(NOTOK);
         }
         error = UFLDestroy(tempNode);
         if (error != OK)
         {
            fprintf(stderr, "UFLDestroy error %hd.\n", error);
            return(NOTOK);
         }
      }
      return(OK);
   }


Parent topic:
XFDL functions