aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/d1_lib.c
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2015-10-06 17:20:32 +0200
committerEmilia Kasper <emilia@openssl.org>2015-10-09 15:32:35 +0200
commit310115448188415e270bb0bef958c7c130939838 (patch)
tree4acce2a2cb0626327668858b21dc9f7811e803c5 /ssl/d1_lib.c
parent0f0cfbe24c07376a67b12048686baa318db2cd95 (diff)
downloadopenssl-310115448188415e270bb0bef958c7c130939838.tar.gz
DTLS: remove unused cookie field
Note that this commit constifies a user callback parameter and therefore will break compilation for applications using this callback. But unless they are abusing write access to the buffer, the fix is trivial. Reviewed-by: Andy Polyakov <appro@openssl.org>
Diffstat (limited to 'ssl/d1_lib.c')
-rw-r--r--ssl/d1_lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index 4bdf90a657..3a0a4cf443 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -723,9 +723,9 @@ int dtls1_listen(SSL *s, struct sockaddr *client)
/* This is fatal */
return -1;
}
- if (PACKET_remaining(&cookiepkt) > sizeof(s->d1->rcvd_cookie)
- || s->ctx->app_verify_cookie_cb(s, PACKET_data(&cookiepkt),
- PACKET_remaining(&cookiepkt)) == 0) {
+ if (s->ctx->app_verify_cookie_cb(s, PACKET_data(&cookiepkt),
+ PACKET_remaining(&cookiepkt)) ==
+ 0) {
/*
* We treat invalid cookies in the same was as no cookie as
* per RFC6347