Fwd: Create a signed file from detached signature and clear file content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,
assuming I have the following:
- data.txt
- data.p7s (the detached signature)

Can I generate the bundled (p7m) signed file ?

I tried:

content = BIO_new_file("data.txt", "rb");
signature = BIO_new_file("data.p7s", "rb");
p7 = d2i_PKCS7_bio(signature, NULL);
PKCS7_set_detached(p7, 0);
bundled = BIO_new_file("bundled.p7m", "wb");
i2d_PKCS7_bio_stream(bundled, p7, content, 0);

but the generated file (bundled.p7m) is identical to the signature file (data.p7s)

Thanks,
Antonio


-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux