make update
[openssl.git] / apps / smime.c
index 57ac6d8a265c0f9e3b7e22273714e96ccfb8587e..250fd69a981b0a95913c39661c7e5394eb7bba1a 100644 (file)
@@ -87,7 +87,7 @@ int MAIN(int argc, char **argv)
        int operation = 0;
        int ret = 0;
        char **args;
-       char *inmode = "r", *outmode = "w";
+       const char *inmode = "r", *outmode = "w";
        char *infile = NULL, *outfile = NULL;
        char *signerfile = NULL, *recipfile = NULL;
        char *certfile = NULL, *keyfile = NULL, *contfile=NULL;
@@ -384,9 +384,9 @@ int MAIN(int argc, char **argv)
                }
        else if (operation == SMIME_DECRYPT)
                {
-               if (!recipfile)
+               if (!recipfile && !keyfile)
                        {
-                       BIO_printf(bio_err, "No recipient certificate and key specified\n");
+                       BIO_printf(bio_err, "No recipient certificate or key specified\n");
                        badarg = 1;
                        }
                }