<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#c55">Comment # 55</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:int.teo@gmail.com" title="Theofilos Intzoglou <int.teo@gmail.com>"> <span class="fn">Theofilos Intzoglou</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=134080" name="attach_134080" title="pdfsig: add -nssdi option v2">attachment 134080</a> <a href="attachment.cgi?id=134080&action=edit" title="pdfsig: add -nssdi option v2">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=99416&attachment=134080'>[review]</a>
pdfsig: add -nssdi option v2
Review of <span class=""><a href="attachment.cgi?id=134080" name="attach_134080" title="pdfsig: add -nssdi option v2">attachment 134080</a> <a href="attachment.cgi?id=134080&action=edit" title="pdfsig: add -nssdi option v2">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=99416&attachment=134080'>[review]</a>:
-----------------------------------------------------------------
Omiting the nssdir option doesn't result in nssDir.getCString() being equal to
nullptr so the following changes are required.
::: utils/pdfsig.cc
@@ +197,4 @@
<span class="quote">> fws->setSignatureType(ETSI_CAdES_detached);
> const char* pw = (strlen(password) == 0) ? nullptr : password;
> const char* rs = (strlen(reason) == 0) ? nullptr : reason;
> + if (fws->signDocument(nssDir.getCString(), certNickname, digestName, pw, rs)) {</span >
nssDir.getCString() should be :
nssDir.getLength() ? nssDir.getCString() : nullptr
@@ +217,4 @@
<span class="quote">> }
>
> for (unsigned int i = 0; i < sigCount; i++) {
> + sig_info = sig_widgets.at(i)->validateSignature(nssDir.getCString(), !dontVerifyCert, false, -1 /* now */);</span >
nssDir.getCString() should be :
nssDir.getLength() ? nssDir.getCString() : nullptr</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>