mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-29 05:21:37 +03:00
fixed issue with certificate verification on firefox.
git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@153 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
@ -370,7 +370,7 @@ static int send_server_hello_done(SSL *ssl)
|
||||
*/
|
||||
static int process_client_key_xchg(SSL *ssl)
|
||||
{
|
||||
uint8_t *buf = ssl->bm_data;
|
||||
uint8_t *buf = &ssl->bm_data[ssl->dc->bm_proc_index];
|
||||
int pkt_size = ssl->bm_index;
|
||||
int premaster_size, secret_length = (buf[2] << 8) + buf[3];
|
||||
uint8_t premaster_secret[MAX_KEY_BYTE_SIZE];
|
||||
@ -384,8 +384,6 @@ static int process_client_key_xchg(SSL *ssl)
|
||||
goto error;
|
||||
}
|
||||
|
||||
DISPLAY_RSA(ssl, rsa_ctx);
|
||||
|
||||
/* is there an extra size field? */
|
||||
if ((secret_length - 2) == rsa_ctx->num_octets)
|
||||
offset += 2;
|
||||
@ -419,6 +417,7 @@ static int process_client_key_xchg(SSL *ssl)
|
||||
ssl->next_state = HS_FINISHED;
|
||||
#endif
|
||||
error:
|
||||
ssl->dc->bm_proc_index += rsa_ctx->num_octets+offset;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -440,7 +439,7 @@ static int send_certificate_request(SSL *ssl)
|
||||
*/
|
||||
static int process_cert_verify(SSL *ssl)
|
||||
{
|
||||
uint8_t *buf = ssl->bm_data;
|
||||
uint8_t *buf = &ssl->bm_data[ssl->dc->bm_proc_index];
|
||||
int pkt_size = ssl->bm_index;
|
||||
uint8_t dgst_buf[MAX_KEY_BYTE_SIZE];
|
||||
uint8_t dgst[MD5_SIZE+SHA1_SIZE];
|
||||
@ -449,7 +448,6 @@ static int process_cert_verify(SSL *ssl)
|
||||
int n;
|
||||
|
||||
PARANOIA_CHECK(pkt_size, x509_ctx->rsa_ctx->num_octets+6);
|
||||
|
||||
DISPLAY_RSA(ssl, x509_ctx->rsa_ctx);
|
||||
|
||||
/* rsa_ctx->bi_ctx is not thread-safe */
|
||||
|
Reference in New Issue
Block a user