summaryrefslogtreecommitdiffstats
path: root/apps/s_time.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-03-06 15:39:46 +0100
committerMatt Caswell <matt@openssl.org>2015-03-23 16:23:18 +0100
commitac59d70553723cd8c7c1558071a2e1672d80daef (patch)
treea35c6bddb4f86bcbcc1f4f6acfb38acd3b43a72c /apps/s_time.c
parentFix missing return value checks (diff)
downloadopenssl-ac59d70553723cd8c7c1558071a2e1672d80daef.tar.xz
openssl-ac59d70553723cd8c7c1558071a2e1672d80daef.zip
apps return value checks
Ensure that all libssl functions called from within the apps have their return values checked where appropriate. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/s_time.c')
-rw-r--r--apps/s_time.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/s_time.c b/apps/s_time.c
index 96e39aa90d..5b94634a53 100644
--- a/apps/s_time.c
+++ b/apps/s_time.c
@@ -356,7 +356,8 @@ int MAIN(int argc, char **argv)
if (st_bugs)
SSL_CTX_set_options(tm_ctx, SSL_OP_ALL);
- SSL_CTX_set_cipher_list(tm_ctx, tm_cipher);
+ if(!SSL_CTX_set_cipher_list(tm_ctx, tm_cipher))
+ goto end;
if (!set_cert_stuff(tm_ctx, t_cert_file, t_key_file))
goto end;
@@ -405,7 +406,8 @@ int MAIN(int argc, char **argv)
if (s_www_path != NULL) {
BIO_snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n",
s_www_path);
- SSL_write(scon, buf, strlen(buf));
+ if(SSL_write(scon, buf, strlen(buf)) <= 0)
+ goto end;
while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
bytes_read += i;
}
@@ -461,7 +463,8 @@ int MAIN(int argc, char **argv)
if (s_www_path != NULL) {
BIO_snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n", s_www_path);
- SSL_write(scon, buf, strlen(buf));
+ if(SSL_write(scon, buf, strlen(buf)) <= 0)
+ goto end;
while (SSL_read(scon, buf, sizeof(buf)) > 0) ;
}
#ifdef NO_SHUTDOWN
@@ -498,7 +501,8 @@ int MAIN(int argc, char **argv)
if (s_www_path) {
BIO_snprintf(buf, sizeof buf, "GET %s HTTP/1.0\r\n\r\n",
s_www_path);
- SSL_write(scon, buf, strlen(buf));
+ if(SSL_write(scon, buf, strlen(buf)) <= 0)
+ goto end;
while ((i = SSL_read(scon, buf, sizeof(buf))) > 0)
bytes_read += i;
}