RetroArch
ssl_parse_max_fragment_length_ext.h
Go to the documentation of this file.
1 #ifndef _SSL_PARSE_MAX_FRAGMENT_LENGTH_EXT_H
2 #define _SSL_PARSE_MAX_FRAGMENT_LENGTH_EXT_H
3 
5  const unsigned char *buf,
6  size_t len )
7 {
8  if( len != 1 || buf[0] >= MBEDTLS_SSL_MAX_FRAG_LEN_INVALID )
9  {
10  MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad client hello message" ) );
14  }
15 
16  ssl->session_negotiate->mfl_code = buf[0];
17 
18  return( 0 );
19 }
20 
21 #endif
int mbedtls_ssl_send_alert_message(mbedtls_ssl_context *ssl, unsigned char level, unsigned char message)
Send an alert message.
Definition: ssl_tls.c:4113
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:8418
unsigned char mfl_code
Definition: ssl.h:571
GLenum GLsizei len
Definition: glext.h:7389
#define MBEDTLS_SSL_ALERT_LEVEL_FATAL
Definition: ssl.h:274
#define MBEDTLS_SSL_DEBUG_MSG(level, args)
Definition: debug.h:42
Definition: ssl.h:763
#define MBEDTLS_SSL_MAX_FRAG_LEN_INVALID
Definition: ssl.h:134
static int ssl_parse_max_fragment_length_ext(mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len)
Definition: ssl_parse_max_fragment_length_ext.h:4
#define MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO
Definition: ssl.h:78
#define MBEDTLS_SSL_ALERT_MSG_ILLEGAL_PARAMETER
Definition: ssl.h:289
mbedtls_ssl_session * session_negotiate
Definition: ssl.h:798