-/* $OpenBSD: ssl_clnt.c,v 1.99 2021/05/16 14:10:43 jsing Exp $ */
+/* $OpenBSD: ssl_clnt.c,v 1.100 2021/06/27 18:09:07 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
if (!CBS_get_u16(&cbs, &sigalg_value))
goto decode_err;
- if ((sigalg = ssl_sigalg(sigalg_value, tls12_sigalgs,
- tls12_sigalgs_len)) == NULL) {
+ if ((sigalg = ssl_sigalg_from_value(sigalg_value,
+ tls12_sigalgs, tls12_sigalgs_len)) == NULL) {
SSLerror(s, SSL_R_UNKNOWN_DIGEST);
al = SSL_AD_DECODE_ERROR;
goto fatal_err;
-/* $OpenBSD: ssl_sigalgs.c,v 1.27 2021/06/27 17:59:17 jsing Exp $ */
+/* $OpenBSD: ssl_sigalgs.c,v 1.28 2021/06/27 18:09:07 jsing Exp $ */
/*
* Copyright (c) 2018-2020 Bob Beck <beck@openbsd.org>
*
}
const struct ssl_sigalg *
-ssl_sigalg(uint16_t sigalg, const uint16_t *values, size_t len)
+ssl_sigalg_from_value(uint16_t sigalg, const uint16_t *values, size_t len)
{
int i;
if (!CBS_get_u16(&cbs, &sig_alg))
return 0;
- if ((sigalg = ssl_sigalg(sig_alg, tls_sigalgs,
+ if ((sigalg = ssl_sigalg_from_value(sig_alg, tls_sigalgs,
tls_sigalgs_len)) == NULL)
continue;
-/* $OpenBSD: ssl_sigalgs.h,v 1.18 2021/06/27 17:59:17 jsing Exp $ */
+/* $OpenBSD: ssl_sigalgs.h,v 1.19 2021/06/27 18:09:07 jsing Exp $ */
/*
* Copyright (c) 2018-2019 Bob Beck <beck@openbsd.org>
*
extern const size_t tls13_sigalgs_len;
const struct ssl_sigalg *ssl_sigalg_lookup(uint16_t sigalg);
-const struct ssl_sigalg *ssl_sigalg(uint16_t sigalg, const uint16_t *values, size_t len);
+const struct ssl_sigalg *ssl_sigalg_from_value(uint16_t sigalg,
+ const uint16_t *values, size_t len);
int ssl_sigalgs_build(uint16_t tls_version, CBB *cbb);
int ssl_sigalg_pkey_check(uint16_t sigalg, EVP_PKEY *pk);
int ssl_sigalg_pkey_ok(const struct ssl_sigalg *sigalg, EVP_PKEY *pkey,
-/* $OpenBSD: ssl_srvr.c,v 1.112 2021/06/27 17:59:17 jsing Exp $ */
+/* $OpenBSD: ssl_srvr.c,v 1.113 2021/06/27 18:09:07 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
if (!CBS_get_u16(&cbs, &sigalg_value))
goto decode_err;
- if ((sigalg = ssl_sigalg(sigalg_value, tls12_sigalgs,
- tls12_sigalgs_len)) == NULL ||
+ if ((sigalg = ssl_sigalg_from_value(sigalg_value,
+ tls12_sigalgs, tls12_sigalgs_len)) == NULL ||
(md = sigalg->md()) == NULL) {
SSLerror(s, SSL_R_UNKNOWN_DIGEST);
al = SSL_AD_DECODE_ERROR;
-/* $OpenBSD: tls13_client.c,v 1.80 2021/06/08 18:13:50 tb Exp $ */
+/* $OpenBSD: tls13_client.c,v 1.81 2021/06/27 18:09:07 jsing Exp $ */
/*
* Copyright (c) 2018, 2019 Joel Sing <jsing@openbsd.org>
*
if (!CBS_get_u16_length_prefixed(cbs, &signature))
goto err;
- if ((sigalg = ssl_sigalg(signature_scheme, tls13_sigalgs,
- tls13_sigalgs_len)) == NULL)
+ if ((sigalg = ssl_sigalg_from_value(signature_scheme,
+ tls13_sigalgs, tls13_sigalgs_len)) == NULL)
goto err;
if (!CBB_init(&cbb, 0))
-/* $OpenBSD: tls13_server.c,v 1.78 2021/06/11 11:13:53 jsing Exp $ */
+/* $OpenBSD: tls13_server.c,v 1.79 2021/06/27 18:09:07 jsing Exp $ */
/*
* Copyright (c) 2019, 2020 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2020 Bob Beck <beck@openbsd.org>
if (!CBS_get_u16_length_prefixed(cbs, &signature))
goto err;
- if ((sigalg = ssl_sigalg(signature_scheme, tls13_sigalgs,
- tls13_sigalgs_len)) == NULL)
+ if ((sigalg = ssl_sigalg_from_value(signature_scheme,
+ tls13_sigalgs, tls13_sigalgs_len)) == NULL)
goto err;
if (!CBB_init(&cbb, 0))