Remove demos/tunala
[openssl.git] / demos / cms / cms_dec.c
index 18e7157eda7a347b60cfbcec5b32e507006c58dc..9fee0a3ebfc4d519e5eadf3a3bd4967ab1802153 100644 (file)
@@ -29,25 +29,25 @@ int main(int argc, char **argv)
        if (!rcert || !rkey)
                goto err;
 
-       /* Open content being signed */
+       /* Open S/MIME message to decrypt */
 
        in = BIO_new_file("smencr.txt", "r");
 
        if (!in)
                goto err;
 
-       /* Sign content */
+       /* Parse message */
        cms = SMIME_read_CMS(in, NULL);
 
        if (!cms)
                goto err;
 
-       out = BIO_new_file("encrout.txt", "w");
+       out = BIO_new_file("decout.txt", "w");
        if (!out)
                goto err;
 
        /* Decrypt S/MIME message */
-       if (!CMS_decrypt(cms, rkey, rcert, out, NULL, 0))
+       if (!CMS_decrypt(cms, rkey, rcert, NULL, out, 0))
                goto err;
 
        ret = 0;
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
 
        if (ret)
                {
-               fprintf(stderr, "Error Signing Data\n");
+               fprintf(stderr, "Error Decrypting Data\n");
                ERR_print_errors_fp(stderr);
                }