-/* $OpenBSD: tls_config.c,v 1.69 2024/03/27 07:35:30 joshua Exp $ */
+/* $OpenBSD: tls_config.c,v 1.70 2024/03/28 06:55:02 joshua Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
*
*alpn_len = 0;
if ((buf_len = strlen(alpn) + 1) > 65535) {
- tls_config_set_errorx(config, TLS_ERROR_UNKNOWN, "alpn too large");
+ tls_config_set_errorx(config, TLS_ERROR_INVALID_ARGUMENT,
+ "alpn too large");
goto err;
}
const unsigned char *session_id, size_t len)
{
if (len > TLS_MAX_SESSION_ID_LENGTH) {
- tls_config_set_errorx(config, TLS_ERROR_UNKNOWN,
+ tls_config_set_errorx(config, TLS_ERROR_INVALID_ARGUMENT,
"session ID too large");
return (-1);
}
tls_config_set_session_lifetime(struct tls_config *config, int lifetime)
{
if (lifetime > TLS_MAX_SESSION_TIMEOUT) {
- tls_config_set_errorx(config, TLS_ERROR_UNKNOWN,
+ tls_config_set_errorx(config, TLS_ERROR_INVALID_ARGUMENT,
"session lifetime too large");
return (-1);
}
if (lifetime != 0 && lifetime < TLS_MIN_SESSION_TIMEOUT) {
- tls_config_set_errorx(config, TLS_ERROR_UNKNOWN,
+ tls_config_set_errorx(config, TLS_ERROR_INVALID_ARGUMENT,
"session lifetime too small");
return (-1);
}
-/* $OpenBSD: tls_signer.c,v 1.11 2024/03/28 02:08:24 joshua Exp $ */
+/* $OpenBSD: tls_signer.c,v 1.12 2024/03/28 06:55:02 joshua Exp $ */
/*
* Copyright (c) 2021 Eric Faurot <eric@openbsd.org>
*
}
if (input_len > INT_MAX) {
- tls_error_setx(&signer->error, TLS_ERROR_UNKNOWN,
+ tls_error_setx(&signer->error, TLS_ERROR_INVALID_ARGUMENT,
"input too large");
return (-1);
}
}
if (input_len > INT_MAX) {
- tls_error_setx(&signer->error, TLS_ERROR_UNKNOWN,
+ tls_error_setx(&signer->error, TLS_ERROR_INVALID_ARGUMENT,
"digest too large");
return (-1);
}