Fix a bone-head bug. This warrants a CHANGES entry because it could affect
authorGeoff Thorpe <geoff@openssl.org>
Thu, 13 Mar 2003 20:28:42 +0000 (20:28 +0000)
committerGeoff Thorpe <geoff@openssl.org>
Thu, 13 Mar 2003 20:28:42 +0000 (20:28 +0000)
applications if they were passing a bogus 'flags' parameter yet having
things work as they wanted anyway.

CHANGES
crypto/engine/eng_fat.c

diff --git a/CHANGES b/CHANGES
index 6d5704a6d15a54de67d3bf02781566ee084e0d0c..bf9d55c4a5177a344d3926d4638d11eac4ae6255 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,12 @@
 
  Changes between 0.9.7a and 0.9.8  [xx XXX xxxx]
 
 
  Changes between 0.9.7a and 0.9.8  [xx XXX xxxx]
 
+  *) Fixed a typo bug that would cause ENGINE_set_default() to set an
+     ENGINE as defaults for all supported algorithms irrespective of
+     the 'flags' parameter. 'flags' is now honoured, so applications
+     should make sure they are passing it correctly.
+     [Geoff Thorpe]
+
   *) Make sure the default DSA_METHOD implementation only uses its
      dsa_mod_exp() and/or bn_mod_exp() handlers if they are non-NULL,
      and change its own handlers to be NULL so as to remove unnecessary
   *) Make sure the default DSA_METHOD implementation only uses its
      dsa_mod_exp() and/or bn_mod_exp() handlers if they are non-NULL,
      and change its own handlers to be NULL so as to remove unnecessary
index c0d03ccbfe8e5a4d3ffe92debdf45daa18852bed..a5ffbec94cdf78d365d1830ea09067f0a29c3d3b 100644 (file)
@@ -71,26 +71,26 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags)
        if((flags & ENGINE_METHOD_DIGESTS) && !ENGINE_set_default_digests(e))
                return 0;
 #ifndef OPENSSL_NO_RSA
        if((flags & ENGINE_METHOD_DIGESTS) && !ENGINE_set_default_digests(e))
                return 0;
 #ifndef OPENSSL_NO_RSA
-       if((flags & ENGINE_METHOD_RSA) & !ENGINE_set_default_RSA(e))
+       if((flags & ENGINE_METHOD_RSA) && !ENGINE_set_default_RSA(e))
                return 0;
 #endif
 #ifndef OPENSSL_NO_DSA
                return 0;
 #endif
 #ifndef OPENSSL_NO_DSA
-       if((flags & ENGINE_METHOD_DSA) & !ENGINE_set_default_DSA(e))
+       if((flags & ENGINE_METHOD_DSA) && !ENGINE_set_default_DSA(e))
                return 0;
 #endif
 #ifndef OPENSSL_NO_DH
                return 0;
 #endif
 #ifndef OPENSSL_NO_DH
-       if((flags & ENGINE_METHOD_DH) & !ENGINE_set_default_DH(e))
+       if((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e))
                return 0;
 #endif
 #ifndef OPENSSL_NO_ECDH
                return 0;
 #endif
 #ifndef OPENSSL_NO_ECDH
-       if((flags & ENGINE_METHOD_ECDH) & !ENGINE_set_default_ECDH(e))
+       if((flags & ENGINE_METHOD_ECDH) && !ENGINE_set_default_ECDH(e))
                return 0;
 #endif
 #ifndef OPENSSL_NO_ECDSA
                return 0;
 #endif
 #ifndef OPENSSL_NO_ECDSA
-       if((flags & ENGINE_METHOD_ECDSA) & !ENGINE_set_default_ECDSA(e))
+       if((flags & ENGINE_METHOD_ECDSA) && !ENGINE_set_default_ECDSA(e))
                return 0;
 #endif
                return 0;
 #endif
-       if((flags & ENGINE_METHOD_RAND) & !ENGINE_set_default_RAND(e))
+       if((flags & ENGINE_METHOD_RAND) && !ENGINE_set_default_RAND(e))
                return 0;
        return 1;
        }
                return 0;
        return 1;
        }