Did I mention I was a rookie? :-) I had not tried that. Excellent suggestion, thank you. I just did (after a crash course in cert & key exports). I do get the following error, however I signed the message and my certs are decrypting it.
Verify error:self signed certificate in certificate chain Adding the -noverify flag I see the correct content of the message output in the console. Progress!!! That exercise highlighted the problem (I think). The cms utility generated a decrypted SMIME text file of 9440 bytes. The same process using my program creates a file of 8192 bytes. The data does appear to be identical up to the point it's truncated. I suppose the first step is to include the cms utility's file into my program to verify I can extract the contents from properly structured SMIME data. The second step would be to then determine why the data is being truncated using CMS_decrypt(). Could that be a problem with how I've configured the BIO? Thank you so much for the help! On Tue, Feb 15, 2011 at 11:24 AM, Dr. Stephen Henson <st...@openssl.org>wrote: > On Tue, Feb 15, 2011, ManicPixel wrote: > > > Hello, > > > > > > I've been searching the mail archives for days and pouring over the > examples > > in the /demo projects and can't seem to figure this one out on my own. > I'm > > trying to use OpenSSL to encrypt and decrypt S/MIME messages. I'd be > happy > > with decrypt at this point! I am a rookie with encryption and SMIME so > > forgive the massive post but I wanted to try and explain my situation as > > best I could. > > > > > > I have an smime.p7m signed and encrypted file generated by Outlook and a > > encrypt.p12 with the user certificate, public & private keys. What I've > > managed to cobble together based from many posts in these archives, the > > demos and documentation is the following. > > > > Before you write a program have you tried the cms utility to see if it can > correctly decrypt/verify the message? > > Steve. > -- > Dr Stephen N. Henson. OpenSSL project core developer. > Commercial tech support now available see: http://www.openssl.org > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List openssl-users@openssl.org > Automated List Manager majord...@openssl.org >