<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div><div>Hi,<br>assuming I have the following:<br>- data.txt<br>- data.p7s (the detached signature)<br><br>Can I generate the bundled (p7m) signed file ?<br><br>I tried:<br><br>content = BIO_new_file("data.txt", "rb");<br>signature = BIO_new_file("data.p7s", "rb");<br>p7 = d2i_PKCS7_bio(signature, NULL);<br>PKCS7_set_detached(p7, 0);<br>bundled = BIO_new_file("bundled.p7m", "wb");<br>i2d_PKCS7_bio_stream(bundled, p7, content, 0);<br><br>but the generated file (bundled.p7m) is identical to the signature file (data.p7s)<br><br></div>Thanks,<br></div>Antonio<br><div><div><br></div></div></div>
</div><br></div>