Add -keyform. Document -engine.
[openssl.git] / apps / rsautl.c
index 56025c5f0cc1719bcca6f5a36543139c85d31e42..e4bc219063a7942a3b54454d75f0174387b734ef 100644 (file)
@@ -62,7 +62,6 @@
 #include <string.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
-#include <openssl/engine.h>
 
 #define RSA_SIGN       1
 #define RSA_VERIFY     2
@@ -120,6 +119,9 @@ int MAIN(int argc, char **argv)
                } else if(!strcmp(*argv, "-inkey")) {
                        if (--argc < 1) badarg = 1;
                        keyfile = *(++argv);
+               } else if (strcmp(*argv,"-keyform") == 0) {
+                       if (--argc < 1) goto bad;
+                       keyform=str2fmt(*(++argv));
                } else if(!strcmp(*argv, "-engine")) {
                        if (--argc < 1) badarg = 1;
                        engine = *(++argv);
@@ -288,6 +290,7 @@ static void usage()
        BIO_printf(bio_err, "-in file        input file\n");
        BIO_printf(bio_err, "-out file       output file\n");
        BIO_printf(bio_err, "-inkey file     input key\n");
+       BIO_printf(bio_err, "-keyform arg    private key format - default PEM\n");
        BIO_printf(bio_err, "-pubin          input is an RSA public\n");
        BIO_printf(bio_err, "-certin         input is a certificate carrying an RSA public key\n");
        BIO_printf(bio_err, "-ssl            use SSL v2 padding\n");
@@ -299,6 +302,8 @@ static void usage()
        BIO_printf(bio_err, "-encrypt        encrypt with public key\n");
        BIO_printf(bio_err, "-decrypt        decrypt with private key\n");
        BIO_printf(bio_err, "-hexdump        hex dump output\n");
+       BIO_printf(bio_err, "-engine e       use engine e, possibly a hardware device.\n");
+
 }
 
 #endif