Use correct length when prompting for password.
[oweals/openssl.git] / apps / cms.c
index 7407ae19ce491b2fc12a3cd5e8cc317810af193a..b8c0ee8dd5d93ae2ae59e81060191692876efbc2 100644 (file)
@@ -226,6 +226,8 @@ int MAIN(int argc, char **argv)
                else if (!strcmp(*args,"-camellia256"))
                                cipher = EVP_camellia_256_cbc();
 #endif
+               else if (!strcmp (*args, "-debug_decrypt")) 
+                               flags |= CMS_DEBUG_DECRYPT;
                else if (!strcmp (*args, "-text")) 
                                flags |= CMS_TEXT;
                else if (!strcmp (*args, "-nointern")) 
@@ -1013,6 +1015,8 @@ int MAIN(int argc, char **argv)
        ret = 4;
        if (operation == SMIME_DECRYPT)
                {
+               if (flags & CMS_DEBUG_DECRYPT)
+                       CMS_decrypt(cms, NULL, NULL, NULL, NULL, flags);
 
                if (secret_key)
                        {