Reported by a fellow on Stack Overflow (tuxmania) trying to run the
cms demos .../demos/cms_enc.c and .../demos/cms_dec.c

Around line 50 of cms_dec.c.

*****

OLD:

    /* Decrypt S/MIME message */
    if (!CMS_decrypt(cms, rkey, rcert, out, NULL, 0))
        goto err;

Causes the following:

140502142240416:error:0200B009:system library:fread:Bad file
descriptor:bss_file.c:245:
140502142240416:error:20082002:BIO routines:FILE_READ:system lib:bss_file.c:246:
140502142240416:error:0606506D:digital envelope
routines:EVP_DecryptFinal_ex:wrong final block length:evp_enc.c:532:

*****

NEW:

    /* Decrypt S/MIME message */
    if (!CMS_decrypt(cms, rkey, rcert, NULL, out, 0))
        goto err;

Just need to swap the `out` and `NULL`.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to