-/* $OpenBSD: ssl_locl.h,v 1.351 2021/06/23 11:12:33 tb Exp $ */
+/* $OpenBSD: ssl_locl.h,v 1.352 2021/06/27 19:23:51 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
int use_legacy;
int hrr;
- /* Certificate and sigalg selected for use (static pointers). */
+ /* Certificate selected for use (static pointer). */
const CERT_PKEY *cpk;
- const struct ssl_sigalg *sigalg;
/* Version proposed by peer server. */
uint16_t server_version;
/* Extensions seen in this handshake. */
uint32_t extensions_seen;
+ /* Signature algorithms selected for use (static pointers). */
+ const struct ssl_sigalg *our_sigalg;
+ const struct ssl_sigalg *peer_sigalg;
+
/* sigalgs offered in this handshake in wire form */
uint8_t *sigalgs;
size_t sigalgs_len;
-/* $OpenBSD: tls13_client.c,v 1.82 2021/06/27 18:15:35 jsing Exp $ */
+/* $OpenBSD: tls13_client.c,v 1.83 2021/06/27 19:23:51 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
goto err;
if (!ssl_sigalg_pkey_ok(sigalg, pkey, 1))
goto err;
+ ctx->hs->peer_sigalg = sigalg;
if (CBS_len(&signature) > EVP_PKEY_size(pkey))
goto err;
goto err;
ctx->hs->tls13.cpk = cpk;
- ctx->hs->tls13.sigalg = sigalg;
+ ctx->hs->our_sigalg = sigalg;
if (!CBB_add_u8_length_prefixed(cbb, &cert_request_context))
goto err;
if ((cpk = ctx->hs->tls13.cpk) == NULL)
goto err;
- if ((sigalg = ctx->hs->tls13.sigalg) == NULL)
+ if ((sigalg = ctx->hs->our_sigalg) == NULL)
goto err;
pkey = cpk->privatekey;
-/* $OpenBSD: tls13_server.c,v 1.80 2021/06/27 18:15:35 jsing Exp $ */
+/* $OpenBSD: tls13_server.c,v 1.81 2021/06/27 19:23:51 jsing Exp $ */
/*
* Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
}
ctx->hs->tls13.cpk = cpk;
- ctx->hs->tls13.sigalg = sigalg;
+ ctx->hs->our_sigalg = sigalg;
if ((chain = cpk->chain) == NULL)
chain = s->ctx->extra_certs;
if ((cpk = ctx->hs->tls13.cpk) == NULL)
goto err;
- if ((sigalg = ctx->hs->tls13.sigalg) == NULL)
+ if ((sigalg = ctx->hs->our_sigalg) == NULL)
goto err;
pkey = cpk->privatekey;
goto err;
if (!ssl_sigalg_pkey_ok(sigalg, pkey, 1))
goto err;
+ ctx->hs->peer_sigalg = sigalg;
if (CBS_len(&signature) > EVP_PKEY_size(pkey))
goto err;