- /* Decrypt S/MIME message */
- if (!CMS_decrypt(cms, rkey, rcert, out, NULL, 0))
- goto err;
-
- ret = 0;
-
- err:
-
- if (ret)
- {
- fprintf(stderr, "Error Signing Data\n");
- ERR_print_errors_fp(stderr);
- }
-
- if (cms)
- CMS_ContentInfo_free(cms);
- if (rcert)
- X509_free(rcert);
- if (rkey)
- EVP_PKEY_free(rkey);
-
- if (in)
- BIO_free(in);
- if (out)
- BIO_free(out);
- if (tbio)
- BIO_free(tbio);
-
- return ret;
-
- }
+ /* Decrypt S/MIME message */
+ if (!CMS_decrypt(cms, rkey, rcert, NULL, out, 0))
+ goto err;