Add a new unsolicited extension error code and add enum tag
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3418)
This commit is contained in:
parent
56c2a6d783
commit
355a0d10a9
4 changed files with 4 additions and 2 deletions
|
@ -2829,6 +2829,7 @@ int ERR_load_SSL_strings(void);
|
|||
# define SSL_R_UNKNOWN_SSL_VERSION 254
|
||||
# define SSL_R_UNKNOWN_STATE 255
|
||||
# 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_ELLIPTIC_CURVE 315
|
||||
# define SSL_R_UNSUPPORTED_PROTOCOL 258
|
||||
|
|
|
@ -843,6 +843,7 @@ static ERR_STRING_DATA SSL_str_reasons[] = {
|
|||
{ERR_REASON(SSL_R_UNKNOWN_STATE), "unknown state"},
|
||||
{ERR_REASON(SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED),
|
||||
"unsafe legacy renegotiation disabled"},
|
||||
{ERR_REASON(SSL_R_UNSOLICITED_EXTENSION), "unsolicited extension"},
|
||||
{ERR_REASON(SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM),
|
||||
"unsupported compression algorithm"},
|
||||
{ERR_REASON(SSL_R_UNSUPPORTED_ELLIPTIC_CURVE),
|
||||
|
|
|
@ -510,7 +510,7 @@ int tls_collect_extensions(SSL *s, PACKET *packet, unsigned int context,
|
|||
&& type != TLSEXT_TYPE_renegotiate
|
||||
&& type != TLSEXT_TYPE_signed_certificate_timestamp
|
||||
&& (s->ext.extflags[idx] & SSL_EXT_FLAG_SENT) == 0) {
|
||||
SSLerr(SSL_F_TLS_COLLECT_EXTENSIONS, SSL_R_BAD_EXTENSION);
|
||||
SSLerr(SSL_F_TLS_COLLECT_EXTENSIONS, SSL_R_UNSOLICITED_EXTENSION);
|
||||
*al = SSL_AD_UNSUPPORTED_EXTENSION;
|
||||
goto err;
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ MSG_PROCESS_RETURN tls_process_end_of_early_data(SSL *s, PACKET *pkt);
|
|||
|
||||
/* Extension processing */
|
||||
|
||||
typedef enum {
|
||||
typedef enum ext_return_en {
|
||||
EXT_RETURN_FAIL,
|
||||
EXT_RETURN_SENT,
|
||||
EXT_RETURN_NOT_SENT
|
||||
|
|
Loading…
Reference in a new issue