PR: 2220
authorDr. Stephen Henson <steve@openssl.org>
Tue, 6 Apr 2010 11:18:59 +0000 (11:18 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 6 Apr 2010 11:18:59 +0000 (11:18 +0000)
Fixes to make OpenSSL compile with no-rc4

apps/apps.c
apps/dsa.c
apps/rsa.c
crypto/pem/pem.h
crypto/pem/pvkfmt.c
ssl/ssltest.c
util/libeay.num

index 3edb76c8719dccb79a2b799858898699e91444bb..200f1963f5147a792fd455bb90fc3257ff04b3d2 100644 (file)
@@ -923,7 +923,7 @@ 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)
+#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_DSA) && !defined (OPENSSL_NO_RC4)
        else if (format == FORMAT_MSBLOB)
                pkey = b2i_PrivateKey_bio(key);
        else if (format == FORMAT_PVK)
index 1109346f78c7672e4d2ef54b68e35975f5975314..5222487ab9cf865e46d12f2dca34cd67fdecb713 100644 (file)
@@ -334,7 +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
+#if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_RC4)
        } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
                EVP_PKEY *pk;
                pk = EVP_PKEY_new();
index b3c8aff7e33aca03252bbb93c9ef24bf305b2a5b..a17708fe9cab0916b3c32dcbce529ecde6da7022 100644 (file)
@@ -409,7 +409,7 @@ bad:
                        }
                else i=PEM_write_bio_RSAPrivateKey(out,rsa,
                                                enc,NULL,0,NULL,passout);
-#ifndef OPENSSL_NO_DSA
+#if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_RC4)
        } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
                EVP_PKEY *pk;
                pk = EVP_PKEY_new();
index c2d7690580ebf1a32e89e96c2945345abb30e6a5..fb704975b74d927594b1725c55f9a0202a21b970 100644 (file)
@@ -548,10 +548,11 @@ EVP_PKEY *b2i_PrivateKey_bio(BIO *in);
 EVP_PKEY *b2i_PublicKey_bio(BIO *in);
 int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk);
 int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk);
-
+#ifndef OPENSSL_NO_RC4
 EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u);
 int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel,
                pem_password_cb *cb, void *u);
+#endif
 
 
 /* BEGIN ERROR CODES */
index 0d6c749c33ed2faf5c8b5083cd3c44f18dd79a9c..0dd6f5d98a6a3dc7f8049f1642195b8d6c598755 100644 (file)
@@ -654,6 +654,8 @@ int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk)
        return do_i2b_bio(out, pk, 1);
        }
 
+#ifndef OPENSSL_NO_RC4
+
 static int do_PVK_header(const unsigned char **in, unsigned int length,
                int skip_magic,
                unsigned int *psaltlen, unsigned int *pkeylen)
@@ -946,4 +948,7 @@ int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel,
                }
        return -1;
        }
+
+#endif
+
 #endif
index abf214ad7f9b4d2a7f324c4e68f3d1ec8c9cc711..ed01651e62b6af0edf78333a3caf4b88db2729ec 100644 (file)
@@ -484,8 +484,8 @@ int main(int argc, char *argv[])
        int comp = 0;
 #ifndef OPENSSL_NO_COMP
        COMP_METHOD *cm = NULL;
-#endif
        STACK_OF(SSL_COMP) *ssl_comp_methods = NULL;
+#endif
        int test_cipherlist = 0;
 
        verbose = 0;
index 0243d05b46d089dd683b81a60802ad885a5fe41c..efc0f10f427bf9f7e28bad0a0675f3ca5a2a6653 100755 (executable)
@@ -3861,10 +3861,10 @@ EVP_PKEY_meth_set_sign                  4243    EXIST::FUNCTION:
 CRYPTO_THREADID_current                 4244   EXIST::FUNCTION:
 EVP_PKEY_decrypt_init                   4245   EXIST::FUNCTION:
 NETSCAPE_X509_free                      4246   EXIST::FUNCTION:
-i2b_PVK_bio                             4247   EXIST::FUNCTION:
+i2b_PVK_bio                             4247   EXIST::FUNCTION:RC4
 EVP_PKEY_print_private                  4248   EXIST::FUNCTION:
 GENERAL_NAME_get0_value                 4249   EXIST::FUNCTION:
-b2i_PVK_bio                             4250   EXIST::FUNCTION:
+b2i_PVK_bio                             4250   EXIST::FUNCTION:RC4
 ASN1_UTCTIME_adj                        4251   EXIST::FUNCTION:
 TS_TST_INFO_new                         4252   EXIST::FUNCTION:
 EVP_MD_do_all_sorted                    4253   EXIST::FUNCTION: