diff options
author | jsing <> | 2019-02-11 17:48:15 +0000 |
---|---|---|
committer | jsing <> | 2019-02-11 17:48:15 +0000 |
commit | 340ba8d1a0d10761e6beb200d6a90332c7a7d3ba (patch) | |
tree | ea2ea6e9de0d1e517cc0729929682b8ed2530317 /src/lib/libssl/tls13_handshake.c | |
parent | bc7cd6de243436fe1c7d5d876b63335ee03c3250 (diff) | |
download | openbsd-340ba8d1a0d10761e6beb200d6a90332c7a7d3ba.tar.gz openbsd-340ba8d1a0d10761e6beb200d6a90332c7a7d3ba.tar.bz2 openbsd-340ba8d1a0d10761e6beb200d6a90332c7a7d3ba.zip |
Implement handling of Certificate and CertificateVerify messages.
This allows the TLS 1.3 client to process the certificates that the server
has sent and verify that the server has possession of the private key.
ok tb@
Diffstat (limited to 'src/lib/libssl/tls13_handshake.c')
-rw-r--r-- | src/lib/libssl/tls13_handshake.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/src/lib/libssl/tls13_handshake.c b/src/lib/libssl/tls13_handshake.c index 8d5b0e3516..3ebf1e9d73 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.25 2019/02/10 13:04:29 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_handshake.c,v 1.26 2019/02/11 17:48:15 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> |
@@ -491,35 +491,12 @@ tls13_server_encrypted_extensions_send(struct tls13_ctx *ctx) | |||
491 | } | 491 | } |
492 | 492 | ||
493 | int | 493 | int |
494 | tls13_server_certificate_recv(struct tls13_ctx *ctx) | ||
495 | { | ||
496 | return 0; | ||
497 | } | ||
498 | |||
499 | int | ||
500 | tls13_server_certificate_send(struct tls13_ctx *ctx) | 494 | tls13_server_certificate_send(struct tls13_ctx *ctx) |
501 | { | 495 | { |
502 | return 0; | 496 | return 0; |
503 | } | 497 | } |
504 | 498 | ||
505 | int | 499 | int |
506 | tls13_server_certificate_request_recv(struct tls13_ctx *ctx) | ||
507 | { | ||
508 | /* | ||
509 | * Thanks to poor state design in the RFC, this function can be called | ||
510 | * when we actually have a certificate message instead of a certificate | ||
511 | * request... in that case we call the certificate handler after | ||
512 | * switching state, to avoid advancing state. | ||
513 | */ | ||
514 | if (tls13_handshake_msg_type(ctx->hs_msg) == TLS13_MT_CERTIFICATE) { | ||
515 | ctx->handshake_stage.hs_type |= WITHOUT_CR; | ||
516 | return tls13_server_certificate_recv(ctx); | ||
517 | } | ||
518 | |||
519 | return 0; | ||
520 | } | ||
521 | |||
522 | int | ||
523 | tls13_server_certificate_request_send(struct tls13_ctx *ctx) | 500 | tls13_server_certificate_request_send(struct tls13_ctx *ctx) |
524 | { | 501 | { |
525 | return 0; | 502 | return 0; |
@@ -532,12 +509,6 @@ tls13_server_certificate_verify_send(struct tls13_ctx *ctx) | |||
532 | } | 509 | } |
533 | 510 | ||
534 | int | 511 | int |
535 | tls13_server_certificate_verify_recv(struct tls13_ctx *ctx) | ||
536 | { | ||
537 | return 0; | ||
538 | } | ||
539 | |||
540 | int | ||
541 | tls13_server_finished_recv(struct tls13_ctx *ctx) | 512 | tls13_server_finished_recv(struct tls13_ctx *ctx) |
542 | { | 513 | { |
543 | return 0; | 514 | return 0; |