mirror of
https://github.com/openssl/openssl.git
synced 2024-11-21 01:15:20 +08:00
QUIC: Add new error codes for tuning API
Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23360)
This commit is contained in:
parent
d51398b998
commit
e203d1b542
@ -1401,6 +1401,8 @@ SSL_R_EXTRA_DATA_IN_MESSAGE:153:extra data in message
|
||||
SSL_R_EXT_LENGTH_MISMATCH:163:ext length mismatch
|
||||
SSL_R_FAILED_TO_GET_PARAMETER:316:failed to get parameter
|
||||
SSL_R_FAILED_TO_INIT_ASYNC:405:failed to init async
|
||||
SSL_R_FEATURE_NEGOTIATION_NOT_COMPLETE:412:feature negotiation not complete
|
||||
SSL_R_FEATURE_NOT_RENEGOTIABLE:413:feature not renegotiable
|
||||
SSL_R_FRAGMENTED_CLIENT_HELLO:401:fragmented client hello
|
||||
SSL_R_GOT_A_FIN_BEFORE_A_CCS:154:got a fin before a ccs
|
||||
SSL_R_HTTPS_PROXY_REQUEST:155:https proxy request
|
||||
@ -1634,6 +1636,9 @@ SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED:338:\
|
||||
unsafe legacy renegotiation disabled
|
||||
SSL_R_UNSOLICITED_EXTENSION:217:unsolicited extension
|
||||
SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM:257:unsupported compression algorithm
|
||||
SSL_R_UNSUPPORTED_CONFIG_VALUE:414:unsupported config value
|
||||
SSL_R_UNSUPPORTED_CONFIG_VALUE_CLASS:415:unsupported config value class
|
||||
SSL_R_UNSUPPORTED_CONFIG_VALUE_OP:416:unsupported config value op
|
||||
SSL_R_UNSUPPORTED_ELLIPTIC_CURVE:315:unsupported elliptic curve
|
||||
SSL_R_UNSUPPORTED_PROTOCOL:258:unsupported protocol
|
||||
SSL_R_UNSUPPORTED_SSL_VERSION:259:unsupported ssl version
|
||||
|
@ -125,6 +125,8 @@
|
||||
# define SSL_R_EXT_LENGTH_MISMATCH 163
|
||||
# define SSL_R_FAILED_TO_GET_PARAMETER 316
|
||||
# define SSL_R_FAILED_TO_INIT_ASYNC 405
|
||||
# define SSL_R_FEATURE_NEGOTIATION_NOT_COMPLETE 412
|
||||
# define SSL_R_FEATURE_NOT_RENEGOTIABLE 413
|
||||
# define SSL_R_FRAGMENTED_CLIENT_HELLO 401
|
||||
# define SSL_R_GOT_A_FIN_BEFORE_A_CCS 154
|
||||
# define SSL_R_HTTPS_PROXY_REQUEST 155
|
||||
@ -346,6 +348,9 @@
|
||||
# define SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED 338
|
||||
# define SSL_R_UNSOLICITED_EXTENSION 217
|
||||
# define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257
|
||||
# define SSL_R_UNSUPPORTED_CONFIG_VALUE 414
|
||||
# define SSL_R_UNSUPPORTED_CONFIG_VALUE_CLASS 415
|
||||
# define SSL_R_UNSUPPORTED_CONFIG_VALUE_OP 416
|
||||
# define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE 315
|
||||
# define SSL_R_UNSUPPORTED_PROTOCOL 258
|
||||
# define SSL_R_UNSUPPORTED_SSL_VERSION 259
|
||||
|
@ -180,6 +180,10 @@ static const ERR_STRING_DATA SSL_str_reasons[] = {
|
||||
"failed to get parameter"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_FAILED_TO_INIT_ASYNC),
|
||||
"failed to init async"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_FEATURE_NEGOTIATION_NOT_COMPLETE),
|
||||
"feature negotiation not complete"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_FEATURE_NOT_RENEGOTIABLE),
|
||||
"feature not renegotiable"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_FRAGMENTED_CLIENT_HELLO),
|
||||
"fragmented client hello"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_GOT_A_FIN_BEFORE_A_CCS),
|
||||
@ -564,6 +568,12 @@ static const ERR_STRING_DATA SSL_str_reasons[] = {
|
||||
"unsolicited extension"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM),
|
||||
"unsupported compression algorithm"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNSUPPORTED_CONFIG_VALUE),
|
||||
"unsupported config value"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNSUPPORTED_CONFIG_VALUE_CLASS),
|
||||
"unsupported config value class"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNSUPPORTED_CONFIG_VALUE_OP),
|
||||
"unsupported config value op"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNSUPPORTED_ELLIPTIC_CURVE),
|
||||
"unsupported elliptic curve"},
|
||||
{ERR_PACK(ERR_LIB_SSL, 0, SSL_R_UNSUPPORTED_PROTOCOL),
|
||||
|
@ -7636,6 +7636,35 @@ int SSL_get_conn_close_info(SSL *s, SSL_CONN_CLOSE_INFO *info,
|
||||
#endif
|
||||
}
|
||||
|
||||
int SSL_get_value_uint(SSL *s, uint32_t class_, uint32_t id,
|
||||
uint64_t *value)
|
||||
{
|
||||
if (value == NULL) {
|
||||
ERR_raise(ERR_LIB_SSL, ERR_R_PASSED_INVALID_ARGUMENT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_QUIC
|
||||
if (IS_QUIC(s))
|
||||
return ossl_quic_get_value_uint(s, class_, id, value);
|
||||
#endif
|
||||
|
||||
ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_PROTOCOL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SSL_set_value_uint(SSL *s, uint32_t class_, uint32_t id,
|
||||
uint64_t value)
|
||||
{
|
||||
#ifndef OPENSSL_NO_QUIC
|
||||
if (IS_QUIC(s))
|
||||
return ossl_quic_set_value_uint(s, class_, id, value);
|
||||
#endif
|
||||
|
||||
ERR_raise(ERR_LIB_SSL, SSL_R_UNSUPPORTED_PROTOCOL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int SSL_add_expected_rpk(SSL *s, EVP_PKEY *rpk)
|
||||
{
|
||||
unsigned char *data = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user