mariano jesus wrote: > > Hi everybody. > > I have the next problem: > > I'm using Visual C++ 6.0 and Win NT with openssl-0.9.5a. I need doing a > encoder for PKCS7. > The openssl-0.9.5a library has an example named "smime.c". I have used > this in my project but in the line > > p7=PKCS7_encrypt(encerts,in,cipher,flags), > > p7 is NULL. > > I have been looking for inside this fuction adding others files ".c", for > example "pkcs7_doit.c". I have encountered in the next line an error: > > if (RAND_bytes(key,keylen)<=0) > > Yes, returns a value less than zero. > > Anyone knows what is wrong here?. > > thanks in advice. Mariano Jess > If you read the FAQ you'll see that you should call ERR_print_errors() or similar after failed calls for more info. Then you'd get the uniquitous PRNG not seeded error which is described there too. Steve. -- Dr Stephen N. Henson. http://www.drh-consultancy.demon.co.uk/ Personal Email: [EMAIL PROTECTED] Senior crypto engineer, Celo Communications: http://www.celocom.com/ Core developer of the OpenSSL project: http://www.openssl.org/ Business Email: [EMAIL PROTECTED] PGP key: via homepage. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]
