<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Sign PDF with digital signature"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99416#c11">Comment # 11</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Sign PDF with digital signature"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99416">bug 99416</a>
              from <span class="vcard"><a class="email" href="mailto:ajohnson@redneon.com" title="Adrian Johnson <ajohnson@redneon.com>"> <span class="fn">Adrian Johnson</span></a>
</span></b>
        <pre>I'd like to keep the pdfsig command line usage consistent with the other
poppler utils.

Most options in the poppler utils are one word, abbreviated word, or acronym.
Single character options are generally only used for some very common options
such as first/last page, help, and version.

I would suggest the following:

"-sign" to sign the document
"-nick" to specify cert nickname
"-digest" to specify the digest algorithm. Or maybe "-hash" is more common.
"-reason" to specify the reason for signing

I don't think the default reason is required. Looking at PDF32000, the reason
is optional so omit it from the PDF if not specified.

Poppler uses "-opw" and -"-upw" for owner and user password. I suggest "-kpw"
for key password.

The "-o" option is not required. Other utils list the output file after the
input. eg
  pdfsig [options] [input-file] [output-file].

"-etsi" - how many signature types are available? Maybe "-type <sigtype" would
be more flexible.


+  certNickname[0] = '\0';
+  password[0] = '\0';
+  strcpy(digestName, "SHA256");
+  reason[0] = '\0';
+  output[0] = '\0';

The other utils initialise string arguments in the declaration:
eg
  static char ownerPassword[33] = "";</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>