Fix typo. Add EVP_PKEY_CTX control function for later use by command line
authorDr. Stephen Henson <steve@openssl.org>
Sun, 9 Apr 2006 00:34:00 +0000 (00:34 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 9 Apr 2006 00:34:00 +0000 (00:34 +0000)
utilities.

apps/apps.c
apps/pkeyutl.c

index c2afdd142add290a0bada10aad6207685ccda733..1b7ca6961f545f7a1a5c7924de3b8ff5b5c440f7 100644 (file)
@@ -2304,6 +2304,24 @@ int bio_to_mem(unsigned char **out, int maxlen, BIO *in)
        return ret;
        }
 
+int pkey_ctrl_string(BIO *err, EVP_PKEY_CTX *ctx, char *value)
+       {
+       char *stmp, *vtmp = NULL;
+       stmp = BUF_strdup(value);
+       int rv;
+       if (!stmp)
+               return -1;
+       vtmp = strchr(stmp, ':');
+       if (vtmp)
+               {
+               *vtmp = 0;
+               vtmp++;
+               }
+       rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp);
+       OPENSSL_free(stmp);
+       return rv;
+       }
+
 static void nodes_print(BIO *out, const char *name,
        STACK_OF(X509_POLICY_NODE) *nodes)
        {
index 119d08b28858150924d633c443351e3a6b85f649..bac935c6d7278e0e38f6d3f2024f8b3043acc65e 100644 (file)
@@ -168,7 +168,7 @@ int MAIN(int argc, char **argv)
                        hexdump = 1;
                else if(!strcmp(*argv, "-sign"))
                        pkey_op = EVP_PKEY_OP_SIGN;
-               else if(!strcmp(*argv, "-verifyr"))
+               else if(!strcmp(*argv, "-verify"))
                        pkey_op = EVP_PKEY_OP_VERIFY;
                else if(!strcmp(*argv, "-verifyrecover"))
                        pkey_op = EVP_PKEY_OP_VERIFYRECOVER;