Fix test/recipes/25-test_verify.t
[openssl.git] / apps / pkeyutl.c
index 4c267c1eecf1d13c45e484262b9415c0fd2f5bef..362415e9606c5e86ac7aa285e674eed1efadc1a7 100644 (file)
@@ -200,6 +200,7 @@ int pkeyutl_main(int argc, char **argv)
             break;
         case OPT_REV:
             rev = 1;
+            break;
         case OPT_ENCRYPT:
             pkey_op = EVP_PKEY_OP_ENCRYPT;
             break;
@@ -229,9 +230,6 @@ int pkeyutl_main(int argc, char **argv)
     if (ctx == NULL)
         goto opthelp;
 
-    if (!app_load_modules(NULL))
-        goto end;
-
     if (sigfile && (pkey_op != EVP_PKEY_OP_VERIFY)) {
         BIO_printf(bio_err,
                    "%s: Signature file specified for non verify\n", prog);
@@ -248,11 +246,11 @@ int pkeyutl_main(int argc, char **argv)
     app_RAND_load_file(NULL, 0);
 
     if (pkey_op != EVP_PKEY_OP_DERIVE) {
-        in = bio_open_default(infile, "rb");
+        in = bio_open_default(infile, 'r', FORMAT_BINARY);
         if (in == NULL)
             goto end;
     }
-    out = bio_open_default(outfile, "wb");
+    out = bio_open_default(outfile, 'w', FORMAT_BINARY);
     if (out == NULL)
         goto end;
 
@@ -378,7 +376,7 @@ static EVP_PKEY_CTX *init_ctx(int *pkeysize,
 
     EVP_PKEY_free(pkey);
 
-    if (!ctx)
+    if (ctx == NULL)
         goto end;
 
     switch (pkey_op) {