diff options
author | Matt Caswell <matt@openssl.org> | 2016-09-13 23:59:11 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-09-14 10:26:36 +0100 |
commit | dd8710dc54f5123d0fa54b5c90fc2c3a9dae43fe (patch) | |
tree | 0a00d4bc813147a87639d6a7612512686c5ca5fa | |
parent | 73f0df8331910d6726d45ecaab12bd93cc48b4e2 (diff) |
Fix OCSP_RESPID processing bug introduced by WPACKET changes
An OCSP_RESPID in a status request extension has 2 bytes for the length
not 1.
Reviewed-by: Rich Salz <rsalz@openssl.org>
-rw-r--r-- | ssl/t1_lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 696998fe5e..4f5ea42b5a 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1209,7 +1209,7 @@ int ssl_add_clienthello_tlsext(SSL *s, WPACKET *pkt, int *al) idlen = i2d_OCSP_RESPID(id, NULL); if (idlen <= 0 /* Sub-packet for an individual id */ - || !WPACKET_sub_allocate_bytes_u8(pkt, idlen, &idbytes) + || !WPACKET_sub_allocate_bytes_u16(pkt, idlen, &idbytes) || i2d_OCSP_RESPID(id, &idbytes) != idlen) { SSLerr(SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT, ERR_R_INTERNAL_ERROR); return 0; |