summaryrefslogtreecommitdiff
path: root/src/lib/libssl/tls13_server.c
diff options
context:
space:
mode:
authorjsing <>2020-05-19 16:35:21 +0000
committerjsing <>2020-05-19 16:35:21 +0000
commit6019fdeeec36b84a28e360616bf851bbb984af8c (patch)
tree5ff7e57b9c4172ec2feea5a8c0a76ee21339a4af /src/lib/libssl/tls13_server.c
parent301bb2dc3c4393a25056c7a1ec7b1d4a5efe6ea2 (diff)
downloadopenbsd-6019fdeeec36b84a28e360616bf851bbb984af8c.tar.gz
openbsd-6019fdeeec36b84a28e360616bf851bbb984af8c.tar.bz2
openbsd-6019fdeeec36b84a28e360616bf851bbb984af8c.zip
Replace SSL_PKEY_RSA_ENC/SSL_PKEY_RSA_SIGN with SSL_PKEY_RSA.
Some time prior to SSLeay 0.8.1b, SSL_PKEY_RSA_SIGN got added with the intention of handling RSA sign only certificates... this incomplete code had the following comment: /* check to see if this is a signing only certificate */ /* EAY EAY EAY EAY */ And while the comment was removed in 2005, the incomplete RSA sign-only handling has remained ever since. Remove SSL_PKEY_RSA_SIGN and rename SSL_PKEY_RSA_ENC to SSL_PKEY_RSA. While here also remove the unused SSL_PKEY_DH_RSA. ok tb@
Diffstat (limited to 'src/lib/libssl/tls13_server.c')
-rw-r--r--src/lib/libssl/tls13_server.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/tls13_server.c b/src/lib/libssl/tls13_server.c
index ea14cfa683..03d0e488ba 100644
--- a/src/lib/libssl/tls13_server.c
+++ b/src/lib/libssl/tls13_server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls13_server.c,v 1.48 2020/05/19 01:30:34 beck Exp $ */ 1/* $OpenBSD: tls13_server.c,v 1.49 2020/05/19 16:35:21 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org> 4 * Copyright (c) 2020 Bob Beck <beck@openbsd.org>
@@ -437,7 +437,7 @@ tls13_server_certificate_send(struct tls13_ctx *ctx, CBB *cbb)
437 int i, ret = 0; 437 int i, ret = 0;
438 438
439 /* XXX - Need to revisit certificate selection. */ 439 /* XXX - Need to revisit certificate selection. */
440 cpk = &s->cert->pkeys[SSL_PKEY_RSA_ENC]; 440 cpk = &s->cert->pkeys[SSL_PKEY_RSA];
441 if (cpk->x509 == NULL) { 441 if (cpk->x509 == NULL) {
442 /* A server must always provide a certificate. */ 442 /* A server must always provide a certificate. */
443 ctx->alert = TLS13_ALERT_HANDSHAKE_FAILURE; 443 ctx->alert = TLS13_ALERT_HANDSHAKE_FAILURE;
@@ -489,7 +489,7 @@ tls13_server_certificate_verify_send(struct tls13_ctx *ctx, CBB *cbb)
489 memset(&sig_cbb, 0, sizeof(sig_cbb)); 489 memset(&sig_cbb, 0, sizeof(sig_cbb));
490 490
491 /* XXX - Need to revisit certificate selection. */ 491 /* XXX - Need to revisit certificate selection. */
492 cpk = &s->cert->pkeys[SSL_PKEY_RSA_ENC]; 492 cpk = &s->cert->pkeys[SSL_PKEY_RSA];
493 pkey = cpk->privatekey; 493 pkey = cpk->privatekey;
494 494
495 if ((sigalg = ssl_sigalg_select(s, pkey)) == NULL) { 495 if ((sigalg = ssl_sigalg_select(s, pkey)) == NULL) {