summaryrefslogtreecommitdiff
path: root/sys/src/libsec
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2015-09-12 13:04:47 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2015-09-12 13:04:47 +0200
commit455b42743d3a3458f7c23926607e53c0b2906e5e (patch)
tree740b9f43fb36d5e90a366f73a74e22e97839ea38 /sys/src/libsec
parentc06e464ec45dd5880850fa60c850498861c514d3 (diff)
libsec: handle TLS 1.2 changes in CertificateRequest message
Diffstat (limited to 'sys/src/libsec')
-rw-r--r--sys/src/libsec/port/tlshand.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/src/libsec/port/tlshand.c b/sys/src/libsec/port/tlshand.c
index bf63312e7..e2f495a9d 100644
--- a/sys/src/libsec/port/tlshand.c
+++ b/sys/src/libsec/port/tlshand.c
@@ -1614,6 +1614,19 @@ msgRecv(TlsConnection *c, Msg *m)
m->u.certificateRequest.types = makebytes(p, nn);
p += nn;
n -= nn;
+ if(c->version >= TLS12Version){
+ /* skip supported_signature_algorithms */
+ if(n < 2)
+ goto Short;
+ nn = get16(p);
+ p += 2;
+ n -= 2;
+ if(nn > n)
+ goto Short;
+ p += nn;
+ n -= nn;
+
+ }
if(n < 2)
goto Short;
nn = get16(p);