summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-04-26 22:18:22 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-04-26 22:18:22 +0000
commitd4f0339c66eace1b7f90f07f43b6d8595342cce3 (patch)
tree9d747a5557303d6ac558c0f5a3c96e553a13e9c0 /apps
parent127186bf574430546ef48bf3a82d5b3697c522c1 (diff)
Update from 1.0.0-stable.
Diffstat (limited to 'apps')
-rw-r--r--apps/apps.c7
-rw-r--r--apps/dh.c6
-rw-r--r--apps/dhparam.c6
-rw-r--r--apps/dsa.c8
-rw-r--r--apps/dsaparam.c6
-rw-r--r--apps/gendh.c6
-rw-r--r--apps/gendsa.c6
-rw-r--r--apps/req.c3
-rw-r--r--apps/rsa.c2
-rw-r--r--apps/rsautl.c6
10 files changed, 54 insertions, 2 deletions
diff --git a/apps/apps.c b/apps/apps.c
index 7294c26f31..b04bfbd3c3 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -921,11 +921,13 @@ EVP_PKEY *load_key(BIO *err, const char *file, int format, int maybe_stdin,
&pkey, NULL, NULL))
goto end;
}
+#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DSA)
else if (format == FORMAT_MSBLOB)
pkey = b2i_PrivateKey_bio(key);
else if (format == FORMAT_PVK)
pkey = b2i_PVK_bio(key, (pem_password_cb *)password_callback,
&cb_data);
+#endif
else
{
BIO_printf(err,"bad input format specified for key file\n");
@@ -989,6 +991,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
{
pkey=d2i_PUBKEY_bio(key, NULL);
}
+#ifndef OPENSSL_NO_RSA
else if (format == FORMAT_ASN1RSA)
{
RSA *rsa;
@@ -1018,7 +1021,7 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
else
pkey = NULL;
}
-
+#endif
else if (format == FORMAT_PEM)
{
pkey=PEM_read_bio_PUBKEY(key,NULL,
@@ -1028,8 +1031,10 @@ EVP_PKEY *load_pubkey(BIO *err, const char *file, int format, int maybe_stdin,
else if (format == FORMAT_NETSCAPE || format == FORMAT_IISSGC)
pkey = load_netscape_key(err, key, file, key_descrip, format);
#endif
+#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DSA)
else if (format == FORMAT_MSBLOB)
pkey = b2i_PublicKey_bio(key);
+#endif
else
{
BIO_printf(err,"bad input format specified for key file\n");
diff --git a/apps/dh.c b/apps/dh.c
index c4d891e125..e9609d630d 100644
--- a/apps/dh.c
+++ b/apps/dh.c
@@ -349,4 +349,10 @@ end:
apps_shutdown();
OPENSSL_EXIT(ret);
}
+#else /* !OPENSSL_NO_DH */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
#endif
diff --git a/apps/dhparam.c b/apps/dhparam.c
index 04bd57c6e8..5fab29eb87 100644
--- a/apps/dhparam.c
+++ b/apps/dhparam.c
@@ -554,4 +554,10 @@ static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
return 1;
}
+#else /* !OPENSSL_NO_DH */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
#endif
diff --git a/apps/dsa.c b/apps/dsa.c
index 5911f11873..9f38e2b77a 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -334,6 +334,7 @@ bad:
i=PEM_write_bio_DSA_PUBKEY(out,dsa);
else i=PEM_write_bio_DSAPrivateKey(out,dsa,enc,
NULL,0,NULL, passout);
+#ifndef OPENSSL_NO_RSA
} else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
EVP_PKEY *pk;
pk = EVP_PKEY_new();
@@ -345,6 +346,7 @@ bad:
else
i = i2b_PrivateKey_bio(out, pk);
EVP_PKEY_free(pk);
+#endif
} else {
BIO_printf(bio_err,"bad output format specified for outfile\n");
goto end;
@@ -365,4 +367,10 @@ end:
apps_shutdown();
OPENSSL_EXIT(ret);
}
+#else /* !OPENSSL_NO_DSA */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
#endif
diff --git a/apps/dsaparam.c b/apps/dsaparam.c
index c301e81af1..4305a739b3 100644
--- a/apps/dsaparam.c
+++ b/apps/dsaparam.c
@@ -475,4 +475,10 @@ static int MS_CALLBACK dsa_cb(int p, int n, BN_GENCB *cb)
#endif
return 1;
}
+#else /* !OPENSSL_NO_DSA */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
#endif
diff --git a/apps/gendh.c b/apps/gendh.c
index 47497864b0..caa7327a10 100644
--- a/apps/gendh.c
+++ b/apps/gendh.c
@@ -235,4 +235,10 @@ static int MS_CALLBACK dh_cb(int p, int n, BN_GENCB *cb)
#endif
return 1;
}
+#else /* !OPENSSL_NO_DH */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
#endif
diff --git a/apps/gendsa.c b/apps/gendsa.c
index 8a296c66e5..22c39629e5 100644
--- a/apps/gendsa.c
+++ b/apps/gendsa.c
@@ -279,4 +279,10 @@ end:
apps_shutdown();
OPENSSL_EXIT(ret);
}
+#else /* !OPENSSL_NO_DSA */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
#endif
diff --git a/apps/req.c b/apps/req.c
index 3b4ab28e5d..e9b764b90c 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -1715,7 +1715,7 @@ static EVP_PKEY_CTX *set_keygen_ctx(BIO *err, const char *gstr, int *pkey_type,
ERR_print_errors(err);
return NULL;
}
-
+#ifndef OPENSSL_NO_RSA
if ((*pkey_type == EVP_PKEY_RSA) && (keylen != -1))
{
if (EVP_PKEY_CTX_set_rsa_keygen_bits(gctx, keylen) <= 0)
@@ -1726,6 +1726,7 @@ static EVP_PKEY_CTX *set_keygen_ctx(BIO *err, const char *gstr, int *pkey_type,
return NULL;
}
}
+#endif
return gctx;
}
diff --git a/apps/rsa.c b/apps/rsa.c
index c316da7109..4a6206bb66 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -409,6 +409,7 @@ bad:
}
else i=PEM_write_bio_RSAPrivateKey(out,rsa,
enc,NULL,0,NULL,passout);
+#ifndef OPENSSL_NO_DSA
} else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
EVP_PKEY *pk;
pk = EVP_PKEY_new();
@@ -420,6 +421,7 @@ bad:
else
i = i2b_PrivateKey_bio(out, pk);
EVP_PKEY_free(pk);
+#endif
} else {
BIO_printf(bio_err,"bad output format specified for outfile\n");
goto end;
diff --git a/apps/rsautl.c b/apps/rsautl.c
index 923e2b682f..b01f004eb3 100644
--- a/apps/rsautl.c
+++ b/apps/rsautl.c
@@ -342,4 +342,10 @@ static void usage()
}
+#else /* !OPENSSL_NO_RSA */
+
+# if PEDANTIC
+static void *dummy=&dummy;
+# endif
+
#endif