diff options
author | marha <marha@users.sourceforge.net> | 2015-06-15 20:18:50 +0200 |
---|---|---|
committer | Mike DePaulo <mikedep333@gmail.com> | 2015-06-22 01:16:46 -0400 |
commit | 36da4a2e0e43928a29ac2ee5c55bf681e90e2f42 (patch) | |
tree | 92633e1022d705c72d0f97315891e719648dd17e /openssl/apps/s_cb.c | |
parent | bec4be4c48239613ed1c704ae71bf08754eef711 (diff) | |
download | vcxsrv-release/external-1.17.0.0-x.tar.gz vcxsrv-release/external-1.17.0.0-x.tar.bz2 vcxsrv-release/external-1.17.0.0-x.zip |
Update to openssl-1.0.2crelease/external-1.17.0.0-x
Diffstat (limited to 'openssl/apps/s_cb.c')
-rw-r--r-- | openssl/apps/s_cb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/openssl/apps/s_cb.c b/openssl/apps/s_cb.c index f6e6bcd76..dd3aa74e0 100644 --- a/openssl/apps/s_cb.c +++ b/openssl/apps/s_cb.c @@ -111,6 +111,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> /* for memcpy() and strcmp() */ #define USE_SOCKETS #define NON_MAIN #include "apps.h" @@ -456,7 +457,7 @@ int ssl_print_curves(BIO *out, SSL *s, int noshared) if (ncurves <= 0) return 1; curves = OPENSSL_malloc(ncurves * sizeof(int)); - if(!curves) { + if (!curves) { BIO_puts(out, "Malloc error getting supported curves\n"); return 0; } @@ -1012,7 +1013,7 @@ int MS_CALLBACK generate_cookie_callback(SSL *ssl, unsigned char *cookie, /* Initialize a random secret */ if (!cookie_initialized) { - if (!RAND_bytes(cookie_secret, COOKIE_SECRET_LENGTH)) { + if (RAND_bytes(cookie_secret, COOKIE_SECRET_LENGTH) <= 0) { BIO_printf(bio_err, "error setting random cookie secret\n"); return 0; } |