Hi I'm currently writing an S/MIME Gateway which transarently signs/encypts/verifies/decrypts mail messages. As input, I get the raw mail, including all headers and mime parts.
I already successfully parsed a pkcs12 and signed a message, however, a few things are open: SMIME_write_PKCS7(out_bio_buffer, p7,in_bio_buffer, flags); lets me write the signature to a out_bio_buffer. I assume out_bio_buffer can be a memory buffer as well: char *out_buffer; BIO *out_bio_buffer; out_buffer = malloc(the_size_of_the_buffer); out_bio_buffer = BIO_new_mem_buf(out_buffer,the_size_of_the_buffer); SMIME_write_PKCS7(out_bio_buffer, p7,in_bio_buffer, flags); - If this is correct, how can I find out the_size_of_the_buffer? - If this is correct, can I then access the signature directly by reading out_buffer? The other question is: Is there a function in the smime part of openssl that lets me extract the header from the body part of a message, so I can simply: - extract header and body - sign body - put together header and signed body and then get a valid signed mail? If not, does anybody know of a small library doing this. gmime is a bit buggy in this respect (sorry for being a bit off-topic). Bye Tim ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]