Recent changes from 0.9.6-stable
authorRichard Levitte <levitte@openssl.org>
Thu, 14 Aug 2003 06:33:04 +0000 (06:33 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 14 Aug 2003 06:33:04 +0000 (06:33 +0000)
apps/Makefile.ssl
ssl/ssl_rsa.c
test/Makefile.ssl

index 0f3a9bcaf9a761406022f0618d39bb778b1fd99a..067795e24492a5a4b1cd5e5d92db1954b5893b85 100644 (file)
@@ -136,12 +136,8 @@ $(DLIBCRYPTO):
 
 $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
        $(RM) $(PROGRAM)
-       if [ "$(SHLIB_TARGET)" = "" ] ; then \
-         $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(PROGRAM) $(CFLAGS) $(PROGRAM).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS)
        -(cd ..; OPENSSL="`pwd`/apps/openssl"; export OPENSSL; $(PERL) tools/c_rehash certs)
 
 progs.h: progs.pl
index 6ec7a5cdb1955c60f5416dbc23239caf83be43bf..d9468fc725eb080b211fd33e637d50eb2ee9e2a5 100644 (file)
@@ -207,7 +207,7 @@ static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey)
                         ok=1;
                else
 #endif
-                       if (!X509_check_private_key(c->pkeys[i].x509,pkey))
+                    if (!X509_check_private_key(c->pkeys[i].x509,pkey))
                        {
                        if ((i == SSL_PKEY_DH_RSA) || (i == SSL_PKEY_DH_DSA))
                                {
@@ -241,6 +241,8 @@ static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey)
                return(0);
                }
 
+       ERR_clear_error(); /* make sure no error from X509_check_private_key()
+                           * is left if we have chosen to ignore it */
        if (c->pkeys[i].privatekey != NULL)
                EVP_PKEY_free(c->pkeys[i].privatekey);
        CRYPTO_add(&pkey->references,1,CRYPTO_LOCK_EVP_PKEY);
index 4fe6d515874dfcc2e011e705533719b0b94d3c16..b6ad59bc79540d011e9803f337604bc1aa9cc3d6 100644 (file)
@@ -258,200 +258,104 @@ $(DLIBCRYPTO):
        (cd ..; $(MAKE) DIRS=crypto all)
 
 $(RSATEST): $(RSATEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(BNTEST): $(BNTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(SHATEST): $(SHATEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(MD4TEST): $(MD4TEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(MD4TEST) $(CFLAGS) $(MD4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(BFTEST): $(BFTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(DESTEST): $(DESTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(DHTEST): $(DHTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(DSATEST): $(DSATEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(METHTEST): $(METHTEST).o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS)
 
 $(ENGINETEST): $(ENGINETEST).o $(DLIBCRYPTO)
        LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
        $(CC) -o $(ENGINETEST) $(CFLAGS) $(ENGINETEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 dummytest: dummytest.o $(DLIBCRYPTO)
-       if [ "$(SHLIB_TARGET)" = "" ]; then \
-         $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       else \
-         LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
-         $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS); \
-       fi
+       LD_LIBRARY_PATH=..:$$LD_LIBRARY_PATH \
+       $(CC) -o dummytest $(CFLAGS) dummytest.o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)
 
 # DO NOT DELETE THIS LINE -- make depend depends on it.