[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Tue Jan 24 13:39:23 UTC 2017


The branch master has been updated
       via  c2114afc1622ff0113974b3696e557ea8bf7ffb4 (commit)
       via  3ed93c863374125296954edcbc595599adbd07ea (commit)
       via  1381684daf8800487b48a70cd634f433b1d6366f (commit)
      from  8f77fab82486c19ab48eee07718e190f76e6ea9a (commit)


- Log -----------------------------------------------------------------
commit c2114afc1622ff0113974b3696e557ea8bf7ffb4
Author: ganesh <ganeshbhambarkar at gmail.com>
Date:   Fri Nov 11 08:43:13 2016 +0530

    RAND_egd_bytes: No need to check RAND_status on connection error.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1886)

commit 3ed93c863374125296954edcbc595599adbd07ea
Author: ganesh <ganeshbhambarkar at gmail.com>
Date:   Thu Nov 10 16:46:43 2016 +0530

    Fixed the return code for RAND_egd_bytes.
    
    According to the documentation, the return code should be -1 when
    RAND_status does not return 1.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1886)

commit 1381684daf8800487b48a70cd634f433b1d6366f
Author: ganesh <ganeshbhambarkar at gmail.com>
Date:   Wed Nov 9 20:44:22 2016 +0530

    Fixed the return code of RAND_query_egd_bytes when connect fails.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/1886)

-----------------------------------------------------------------------

Summary of changes:
 crypto/rand/rand_egd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/crypto/rand/rand_egd.c b/crypto/rand/rand_egd.c
index fb6bad7..dd58b21 100644
--- a/crypto/rand/rand_egd.c
+++ b/crypto/rand/rand_egd.c
@@ -133,6 +133,7 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
                 break;
 #  endif
             default:
+                ret = -1;
                 goto err;       /* failure */
             }
         }
@@ -227,10 +228,10 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
 
 int RAND_egd_bytes(const char *path, int bytes)
 {
-    int num, ret = 0;
+    int num, ret = -1;
 
     num = RAND_query_egd_bytes(path, NULL, bytes);
-    if (num < 1)
+    if (num < 0)
         goto err;
     if (RAND_status() == 1)
         ret = num;


More information about the openssl-commits mailing list