summaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
diff options
context:
space:
mode:
authorKurt Roeckx <kurt@roeckx.be>2016-03-02 14:39:14 +0100
committerKurt Roeckx <kurt@roeckx.be>2016-05-16 20:43:20 +0200
commitd139723b0e6718410d0f11f645387f9c90c1424d (patch)
tree658060e6320e2f4f5d834c6ee4c6fc7ce258a857 /ssl/s3_lib.c
parent05df5c2036f1244fe3df70de7d8079a5d86b999d (diff)
session tickets: use more sizeof
Reviewed-by: Matt Caswell <matt@openssl.org> MR: #2153
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index 6f9b23b1ea..a742b952a8 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -3396,8 +3396,8 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg)
{
unsigned char *keys = parg;
long tlsext_tick_keylen = (sizeof(ctx->tlsext_tick_key_name) +
- sizeof(ctx->tlsext_tick_hmac_key) + (ctx->tlsext_tick_aes_key));
- if (!keys)
+ sizeof(ctx->tlsext_tick_hmac_key) + sizeof(ctx->tlsext_tick_aes_key));
+ if (keys == NULL)
return tlsext_tick_keylen;
if (larg != tlsext_tick_keylen) {
SSLerr(SSL_F_SSL3_CTX_CTRL, SSL_R_INVALID_TICKET_KEYS_LENGTH);