<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><br><div>Hello,</div><div><br></div><div>I have been unable to prevent CMS_SignerInfo_sign() to add a signing time attribute even though I used CMS_NOATTR. I think the issue is here:</div><div><br></div><div><span class="m_-9184221380702085918gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">if</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap"> (</span><span class="m_-9184221380702085918gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">CMS_signed_get_attr_by_NID</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">(<wbr>si, NID_pkcs9_signingTime, -</span><span class="m_-9184221380702085918gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">1</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">) < </span><span class="m_-9184221380702085918gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">0</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">) {</span><br></div><div><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">     </span><span class="m_-9184221380702085918gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">if</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap"> (!</span><span class="m_-9184221380702085918gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">cms_add1_signingTime</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">(si, </span><span class="m_-9184221380702085918gmail-pl-c1" style="box-sizing:border-box;color:rgb(0,134,179);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">NULL</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">))</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">         </span><span class="m_-9184221380702085918gmail-pl-k" style="box-sizing:border-box;color:rgb(167,29,93);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">goto</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap"> err;</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap">}</span><span style="color:rgb(51,51,51);font-family:consolas,"liberation mono",menlo,courier,monospace;font-size:12px;white-space:pre-wrap"><br></span></div><div><br></div><div><div>This is around line 648 of crypto/cms/cms_sd.c.</div></div><div><br></div><div>It seems to me that no matter what, the signing time attribute will be added if not present. If I comment out the above lines I get the result I want, which is no signing time attribute, but maybe I am not using the flags correctly.</div><div><br></div><div>Can someone comment?</div><div><br></div><div>Thanks,</div><div>Luis</div><div><br></div></div>
<br></div><br></div>