mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +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:
parent
85e157927a
commit
86f2e470e0
@ -81,6 +81,7 @@ else # Not Win32
|
||||
|
||||
CFLAGS += -I$(AXTLS_HOME)/config -I$(AXTLS_HOME)/ssl -I$(AXTLS_HOME)/crypto
|
||||
LD=$(CC)
|
||||
STRIP=strip
|
||||
|
||||
# Solaris
|
||||
ifdef CONFIG_PLATFORM_SOLARIS
|
||||
|
@ -97,7 +97,7 @@ ifndef CONFIG_PLATFORM_WIN32
|
||||
$(TARGET): $(OBJ) $(AXTLS_HOME)/$(STAGE)/libaxtls.a
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
|
||||
ifdef CONFIG_STRIP_UNWANTED_SECTIONS
|
||||
strip --remove-section=.comment $(TARGET)
|
||||
$(STRIP) --remove-section=.comment $(TARGET)
|
||||
endif
|
||||
|
||||
$(TARGET2): htpasswd.o $(AXTLS_HOME)/$(STAGE)/libaxtls.a
|
||||
|
@ -61,7 +61,7 @@ ifndef CONFIG_PLATFORM_WIN32
|
||||
$(TARGET): $(OBJ) $(LIBS)/libaxtls.a
|
||||
$(LD) $(LDFLAGS) -o $@ $(OBJ) -L$(LIBS) -laxtls
|
||||
ifdef CONFIG_STRIP_UNWANTED_SECTIONS
|
||||
strip --remove-section=.comment $(TARGET)
|
||||
$(STRIP) --remove-section=.comment $(TARGET)
|
||||
endif # use strip
|
||||
else # Win32
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user