summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorjsing <>2019-01-21 14:19:51 +0000
committerjsing <>2019-01-21 14:19:51 +0000
commit1d9efb961c55d10f321b2626df4b1ed77d104867 (patch)
tree0153bc1e4a8ee619d0024aaf45d51f4ed42f9684 /src/lib
parentd3d1c2c608615609302386dd2757729ee83092be (diff)
downloadopenbsd-1d9efb961c55d10f321b2626df4b1ed77d104867.tar.gz
openbsd-1d9efb961c55d10f321b2626df4b1ed77d104867.tar.bz2
openbsd-1d9efb961c55d10f321b2626df4b1ed77d104867.zip
Use the actual handshake message type in the certificate request handler.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/tls13_handshake.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c
index 160202421c..95f30ded7d 100644
--- a/src/lib/libssl/tls13_handshake.c
+++ b/src/lib/libssl/tls13_handshake.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_handshake.c,v 1.18 2019/01/21 13:45:57 jsing Exp $ */ 1/* $OpenBSD: tls13_handshake.c,v 1.19 2019/01/21 14:19:51 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org> 3 * Copyright (c) 2018-2019 Theo Buehler <tb@openbsd.org>
4 * Copyright (c) 2019 Joel Sing <jsing@openbsd.org> 4 * Copyright (c) 2019 Joel Sing <jsing@openbsd.org>
@@ -509,15 +509,13 @@ tls13_server_certificate_send(struct tls13_ctx *ctx)
509int 509int
510tls13_server_certificate_request_recv(struct tls13_ctx *ctx) 510tls13_server_certificate_request_recv(struct tls13_ctx *ctx)
511{ 511{
512 uint8_t msg_type = 0; /* XXX */
513
514 /* 512 /*
515 * Thanks to poor state design in the RFC, this function can be called 513 * Thanks to poor state design in the RFC, this function can be called
516 * when we actually have a certificate message instead of a certificate 514 * when we actually have a certificate message instead of a certificate
517 * request... in that case we call the certificate handler after 515 * request... in that case we call the certificate handler after
518 * switching state, to avoid advancing state. 516 * switching state, to avoid advancing state.
519 */ 517 */
520 if (msg_type == TLS13_MT_CERTIFICATE) { 518 if (tls13_handshake_msg_type(ctx->hs_msg) == TLS13_MT_CERTIFICATE) {
521 ctx->handshake_stage.hs_type |= WITHOUT_CR; 519 ctx->handshake_stage.hs_type |= WITHOUT_CR;
522 return tls13_server_certificate_recv(ctx); 520 return tls13_server_certificate_recv(ctx);
523 } 521 }