Fixes for 'no-hw' combined with 'no-SOME_CIPHER'.
authorBodo Möller <bodo@openssl.org>
Thu, 14 Mar 2002 09:53:30 +0000 (09:53 +0000)
committerBodo Möller <bodo@openssl.org>
Thu, 14 Mar 2002 09:53:30 +0000 (09:53 +0000)
Fix dsaparam usage output.

Submitted by: Nils Larsch (for 0.9.8-dev; backported to 0.9.7-dev)

apps/apps.c
apps/dsaparam.c
apps/pkcs8.c
apps/speed.c
crypto/engine/hw_4758_cca.c
crypto/engine/hw_sureware.c
crypto/evp/evp_pkey.c

index f0c280c38d953a086775c6de386344d626cf00fe..e797796e30a988ff471331500c24e42cdecbab2f 100644 (file)
@@ -147,7 +147,7 @@ static UI_METHOD *ui_method = NULL;
 static int set_table_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl);
 static int set_multi_opts(unsigned long *flags, const char *arg, const NAME_EX_TBL *in_tbl);
 
-#ifndef OPENSSL_NO_RC4
+#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA)
 /* Looks like this stuff is worth moving into separate function */
 static EVP_PKEY *
 load_netscape_key(BIO *err, BIO *key, const char *file,
@@ -832,7 +832,7 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format,
                pkey=PEM_read_bio_PrivateKey(key,NULL,
                        (pem_password_cb *)password_callback, &cb_data);
                }
-#ifndef OPENSSL_NO_RC4
+#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA)
        else if (format == FORMAT_NETSCAPE || format == FORMAT_IISSGC)
                pkey = load_netscape_key(err, key, file, key_descrip, format);
 #endif
@@ -901,7 +901,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
                pkey=PEM_read_bio_PUBKEY(key,NULL,
                        (pem_password_cb *)password_callback, &cb_data);
                }
-#ifndef OPENSSL_NO_RC4
+#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA)
        else if (format == FORMAT_NETSCAPE || format == FORMAT_IISSGC)
                pkey = load_netscape_key(err, key, file, key_descrip, format);
 #endif
@@ -917,7 +917,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format,
        return(pkey);
        }
 
-#ifndef OPENSSL_NO_RC4
+#if !defined(OPENSSL_NO_RC4) && !defined(OPENSSL_NO_RSA)
 EVP_PKEY *
 load_netscape_key(BIO *err, BIO *key, const char *file,
                const char *key_descrip, int format)
index d54c77d93e56fbae0df005f26a78ce438192134f..c6ecc4890462f60b52f7098ae38df2bf8851636e 100644 (file)
@@ -189,6 +189,7 @@ bad:
                BIO_printf(bio_err," -text         print the key in text\n");
                BIO_printf(bio_err," -C            Output C code\n");
                BIO_printf(bio_err," -noout        no output\n");
+               BIO_printf(bio_err," -genkey       generate a DSA key\n");
                BIO_printf(bio_err," -rand         files to use for random number input\n");
                BIO_printf(bio_err," -engine e     use engine e, possibly a hardware device.\n");
                BIO_printf(bio_err," number        number of bits to use for generating private key\n");
index ea8c04dffa1281fc14b302460b4e6fb853788be4..ba91caee6bb2a3eee9c50ecf4c61f69919402ebe 100644 (file)
@@ -83,7 +83,7 @@ int MAIN(int argc, char **argv)
        int nocrypt = 0;
        X509_SIG *p8;
        PKCS8_PRIV_KEY_INFO *p8inf;
-       EVP_PKEY *pkey;
+       EVP_PKEY *pkey=NULL;
        char pass[50], *passin = NULL, *passout = NULL, *p8pass = NULL;
        int badarg = 0;
        char *engine=NULL;
index b451a49af3b888c882646e0962c4f6b49a29354e..e817a0df152fe25e44c07aee241c353ee3acd3a4 100644 (file)
@@ -372,11 +372,10 @@ int MAIN(int argc, char **argv)
        ENGINE *e = NULL;
        unsigned char *buf=NULL,*buf2=NULL;
        int mret=1;
-       long count=0,save_count=0;
+       long count=0,save_count=0, rsa_count;
        int i,j,k;
 #ifndef OPENSSL_NO_RSA
        unsigned rsa_num;
-       long rsa_count;
 #endif
        unsigned char md[EVP_MAX_MD_SIZE];
 #ifndef OPENSSL_NO_MD2
index a42baf0a54f421cba10ce6f8847b12ef53598f41..959d8f1a61e37ddb2d678d2ed0915f5700f0abb9 100644 (file)
@@ -62,8 +62,8 @@
 #include <openssl/objects.h>
 #include <openssl/engine.h>
 
-#ifndef NO_HW
-#ifndef NO_HW_4758_CCA
+#ifndef OPENSSL_NO_HW
+#ifndef OPENSSL_NO_HW_4758_CCA
 
 #ifdef FLAT_INC
 #include "hw_4758_cca.h"
@@ -946,5 +946,5 @@ IMPLEMENT_DYNAMIC_CHECK_FN()
 IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
 #endif /* ENGINE_DYNAMIC_SUPPORT */
 
-#endif /* !NO_HW_4758_CCA */
-#endif /* !NO_HW */
+#endif /* !OPENSSL_NO_HW_4758_CCA */
+#endif /* !OPENSSL_NO_HW */
index 9d1edb51a9074f401c24ccfcb0c054c731524797..1cc0570f0ec421e3a2fb3d5784fdab0581f3f3ab 100644 (file)
@@ -59,8 +59,8 @@
 #include "engine.h"
 #include <openssl/engine.h>
 
-#ifndef NO_HW
-#ifndef NO_HW_SUREWARE
+#ifndef OPENSSL_NO_HW
+#ifndef OPENSSL_NO_HW_SUREWARE
 
 #ifdef FLAT_INC
 #include "sureware.h"
@@ -961,5 +961,5 @@ static int surewarehk_modexp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
        }
        return ret;
 }
-#endif /* !NO_HW_SureWare */
-#endif /* !NO_HW */
+#endif /* !OPENSSL_NO_HW_SureWare */
+#endif /* !OPENSSL_NO_HW */
index a7c4e9fa7a16ae1117e983bd694bc8fcee866745..34b5b1d21ccbec56fd8bc9a9dd2140d2dacb047b 100644 (file)
@@ -84,9 +84,7 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
 #endif
        X509_ALGOR *a;
        unsigned char *p;
-#ifndef OPENSSL_NO_RSA
        const unsigned char *cp;
-#endif
        int pkeylen;
        char obj_tmp[80];