Fix a bone-head bug. This warrants a CHANGES entry because it could affect
authorGeoff Thorpe <geoff@openssl.org>
Thu, 13 Mar 2003 20:23:19 +0000 (20:23 +0000)
committerGeoff Thorpe <geoff@openssl.org>
Thu, 13 Mar 2003 20:23:19 +0000 (20:23 +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 8c1f5dc227e326c1e6defb9ab4171f8bef48d9c5..ad3d0ae24bd3d3f308cb28ee7a1707ad0226aac6 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,12 @@
 
  Changes between 0.9.7a and 0.9.7b  [xx XXX 2003]
 
+  *) 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]
+
   *) Target "mingw" now allows native Windows code to be generated in
      the Cygwin environment as well as with the MinGW compiler.
      [Ulf Moeller] 
index f7edb5ad32f0e5c6d9f4020b7cb5c489dbddf2c0..0d7dae00b24379f484afc4ad5e05e18b5a06c184 100644 (file)
@@ -66,18 +66,18 @@ 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_RSA) & !ENGINE_set_default_RSA(e))
+       if((flags & ENGINE_METHOD_RSA) && !ENGINE_set_default_RSA(e))
                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
-       if((flags & ENGINE_METHOD_DH) & !ENGINE_set_default_DH(e))
+       if((flags & ENGINE_METHOD_DH) && !ENGINE_set_default_DH(e))
                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;
        }