Loading ssl/d1_lib.c +4 −8 Original line number Diff line number Diff line Loading @@ -35,13 +35,11 @@ const SSL3_ENC_METHOD DTLSv1_enc_data = { tls1_generate_master_secret, tls1_change_cipher_state, tls1_final_finish_mac, TLS1_FINISH_MAC_LENGTH, TLS_MD_CLIENT_FINISH_CONST, TLS_MD_CLIENT_FINISH_CONST_SIZE, TLS_MD_SERVER_FINISH_CONST, TLS_MD_SERVER_FINISH_CONST_SIZE, tls1_alert_code, tls1_export_keying_material, SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV, DTLS1_HM_HEADER_LENGTH, dtls1_set_handshake_header, dtls1_close_construct_packet, dtls1_handshake_write Loading @@ -54,14 +52,12 @@ const SSL3_ENC_METHOD DTLSv1_2_enc_data = { tls1_generate_master_secret, tls1_change_cipher_state, tls1_final_finish_mac, TLS1_FINISH_MAC_LENGTH, TLS_MD_CLIENT_FINISH_CONST, TLS_MD_CLIENT_FINISH_CONST_SIZE, TLS_MD_SERVER_FINISH_CONST, TLS_MD_SERVER_FINISH_CONST_SIZE, tls1_alert_code, tls1_export_keying_material, SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV | SSL_ENC_FLAG_SIGALGS | SSL_ENC_FLAG_SHA256_PRF | SSL_ENC_FLAG_TLS1_2_CIPHERS, DTLS1_HM_HEADER_LENGTH, dtls1_set_handshake_header, dtls1_close_construct_packet, dtls1_handshake_write Loading Loading @@ -435,7 +431,7 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client) unsigned char seq[SEQ_NUM_SIZE]; const unsigned char *data; unsigned char *buf; unsigned long fragoff, fraglen, msglen; size_t fragoff, fraglen, msglen; unsigned int rectype, versmajor, msgseq, msgtype, clientvers, cookielen; BIO *rbio, *wbio; BUF_MEM *bufm; Loading Loading @@ -663,8 +659,7 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client) return -1; } if (s->ctx->app_verify_cookie_cb(s, PACKET_data(&cookiepkt), PACKET_remaining(&cookiepkt)) == 0) { (unsigned int)PACKET_remaining(&cookiepkt)) == 0) { /* * We treat invalid cookies in the same was as no cookie as * per RFC6347 Loading Loading @@ -795,6 +790,7 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client) BIO_ADDR_free(tmpclient); tmpclient = NULL; /* TODO(size_t): convert this call */ if (BIO_write(wbio, buf, wreclen) < (int)wreclen) { if (BIO_should_retry(wbio)) { /* Loading Loading @@ -1072,7 +1068,7 @@ int dtls1_query_mtu(SSL *s) /* Set to min mtu */ s->d1->mtu = dtls1_min_mtu(s); BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SET_MTU, s->d1->mtu, NULL); (long)s->d1->mtu, NULL); } } else return 0; Loading ssl/d1_srtp.c +3 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ static SRTP_PROTECTION_PROFILE srtp_known_profiles[] = { }; static int find_profile_by_name(char *profile_name, SRTP_PROTECTION_PROFILE **pptr, unsigned len) SRTP_PROTECTION_PROFILE **pptr, size_t len) { SRTP_PROTECTION_PROFILE *p; Loading Loading @@ -76,7 +76,8 @@ static int ssl_ctx_make_profiles(const char *profiles_string, do { col = strchr(ptr, ':'); if (!find_profile_by_name(ptr, &p, col ? col - ptr : (int)strlen(ptr))) { if (!find_profile_by_name(ptr, &p, col ? (size_t)(col - ptr) : strlen(ptr))) { if (sk_SRTP_PROTECTION_PROFILE_find(profiles, p) >= 0) { SSLerr(SSL_F_SSL_CTX_MAKE_PROFILES, SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST); Loading ssl/pqueue.c +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ pitem *pqueue_next(pitem **item) return ret; } int pqueue_size(pqueue *pq) size_t pqueue_size(pqueue *pq) { pitem *item = pq->items; int count = 0; Loading ssl/record/rec_layer_s3.c +5 −5 Original line number Diff line number Diff line Loading @@ -122,10 +122,9 @@ void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl) memset(rl->write_sequence, 0, sizeof(rl->write_sequence)); } int ssl3_pending(const SSL *s) size_t ssl3_pending(const SSL *s) { unsigned int i; int num = 0; size_t i, num = 0; if (s->rlayer.rstate == SSL_ST_READ_BODY) return 0; Loading Loading @@ -429,7 +428,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, size_t len, packlen = EVP_CIPHER_CTX_ctrl(s->enc_write_ctx, EVP_CTRL_TLS1_1_MULTIBLOCK_MAX_BUFSIZE, max_send_fragment, NULL); (int)max_send_fragment, NULL); if (len >= 8 * max_send_fragment) packlen *= 8; Loading @@ -443,7 +442,8 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, size_t len, } else if (tot == len) { /* done? */ /* free jumbo buffer */ ssl3_release_write_buffer(s); return tot; *written = tot; return 1; } n = (len - tot); Loading ssl/record/record.h +1 −1 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl); void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl); int RECORD_LAYER_is_sslv2_record(RECORD_LAYER *rl); size_t RECORD_LAYER_get_rrec_length(RECORD_LAYER *rl); __owur int ssl3_pending(const SSL *s); __owur size_t ssl3_pending(const SSL *s); __owur int ssl3_write_bytes(SSL *s, int type, const void *buf, size_t len, size_t *written); int do_ssl3_write(SSL *s, int type, const unsigned char *buf, Loading Loading
ssl/d1_lib.c +4 −8 Original line number Diff line number Diff line Loading @@ -35,13 +35,11 @@ const SSL3_ENC_METHOD DTLSv1_enc_data = { tls1_generate_master_secret, tls1_change_cipher_state, tls1_final_finish_mac, TLS1_FINISH_MAC_LENGTH, TLS_MD_CLIENT_FINISH_CONST, TLS_MD_CLIENT_FINISH_CONST_SIZE, TLS_MD_SERVER_FINISH_CONST, TLS_MD_SERVER_FINISH_CONST_SIZE, tls1_alert_code, tls1_export_keying_material, SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV, DTLS1_HM_HEADER_LENGTH, dtls1_set_handshake_header, dtls1_close_construct_packet, dtls1_handshake_write Loading @@ -54,14 +52,12 @@ const SSL3_ENC_METHOD DTLSv1_2_enc_data = { tls1_generate_master_secret, tls1_change_cipher_state, tls1_final_finish_mac, TLS1_FINISH_MAC_LENGTH, TLS_MD_CLIENT_FINISH_CONST, TLS_MD_CLIENT_FINISH_CONST_SIZE, TLS_MD_SERVER_FINISH_CONST, TLS_MD_SERVER_FINISH_CONST_SIZE, tls1_alert_code, tls1_export_keying_material, SSL_ENC_FLAG_DTLS | SSL_ENC_FLAG_EXPLICIT_IV | SSL_ENC_FLAG_SIGALGS | SSL_ENC_FLAG_SHA256_PRF | SSL_ENC_FLAG_TLS1_2_CIPHERS, DTLS1_HM_HEADER_LENGTH, dtls1_set_handshake_header, dtls1_close_construct_packet, dtls1_handshake_write Loading Loading @@ -435,7 +431,7 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client) unsigned char seq[SEQ_NUM_SIZE]; const unsigned char *data; unsigned char *buf; unsigned long fragoff, fraglen, msglen; size_t fragoff, fraglen, msglen; unsigned int rectype, versmajor, msgseq, msgtype, clientvers, cookielen; BIO *rbio, *wbio; BUF_MEM *bufm; Loading Loading @@ -663,8 +659,7 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client) return -1; } if (s->ctx->app_verify_cookie_cb(s, PACKET_data(&cookiepkt), PACKET_remaining(&cookiepkt)) == 0) { (unsigned int)PACKET_remaining(&cookiepkt)) == 0) { /* * We treat invalid cookies in the same was as no cookie as * per RFC6347 Loading Loading @@ -795,6 +790,7 @@ int DTLSv1_listen(SSL *s, BIO_ADDR *client) BIO_ADDR_free(tmpclient); tmpclient = NULL; /* TODO(size_t): convert this call */ if (BIO_write(wbio, buf, wreclen) < (int)wreclen) { if (BIO_should_retry(wbio)) { /* Loading Loading @@ -1072,7 +1068,7 @@ int dtls1_query_mtu(SSL *s) /* Set to min mtu */ s->d1->mtu = dtls1_min_mtu(s); BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_SET_MTU, s->d1->mtu, NULL); (long)s->d1->mtu, NULL); } } else return 0; Loading
ssl/d1_srtp.c +3 −2 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ static SRTP_PROTECTION_PROFILE srtp_known_profiles[] = { }; static int find_profile_by_name(char *profile_name, SRTP_PROTECTION_PROFILE **pptr, unsigned len) SRTP_PROTECTION_PROFILE **pptr, size_t len) { SRTP_PROTECTION_PROFILE *p; Loading Loading @@ -76,7 +76,8 @@ static int ssl_ctx_make_profiles(const char *profiles_string, do { col = strchr(ptr, ':'); if (!find_profile_by_name(ptr, &p, col ? col - ptr : (int)strlen(ptr))) { if (!find_profile_by_name(ptr, &p, col ? (size_t)(col - ptr) : strlen(ptr))) { if (sk_SRTP_PROTECTION_PROFILE_find(profiles, p) >= 0) { SSLerr(SSL_F_SSL_CTX_MAKE_PROFILES, SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST); Loading
ssl/pqueue.c +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ pitem *pqueue_next(pitem **item) return ret; } int pqueue_size(pqueue *pq) size_t pqueue_size(pqueue *pq) { pitem *item = pq->items; int count = 0; Loading
ssl/record/rec_layer_s3.c +5 −5 Original line number Diff line number Diff line Loading @@ -122,10 +122,9 @@ void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl) memset(rl->write_sequence, 0, sizeof(rl->write_sequence)); } int ssl3_pending(const SSL *s) size_t ssl3_pending(const SSL *s) { unsigned int i; int num = 0; size_t i, num = 0; if (s->rlayer.rstate == SSL_ST_READ_BODY) return 0; Loading Loading @@ -429,7 +428,7 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, size_t len, packlen = EVP_CIPHER_CTX_ctrl(s->enc_write_ctx, EVP_CTRL_TLS1_1_MULTIBLOCK_MAX_BUFSIZE, max_send_fragment, NULL); (int)max_send_fragment, NULL); if (len >= 8 * max_send_fragment) packlen *= 8; Loading @@ -443,7 +442,8 @@ int ssl3_write_bytes(SSL *s, int type, const void *buf_, size_t len, } else if (tot == len) { /* done? */ /* free jumbo buffer */ ssl3_release_write_buffer(s); return tot; *written = tot; return 1; } n = (len - tot); Loading
ssl/record/record.h +1 −1 Original line number Diff line number Diff line Loading @@ -214,7 +214,7 @@ void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl); void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl); int RECORD_LAYER_is_sslv2_record(RECORD_LAYER *rl); size_t RECORD_LAYER_get_rrec_length(RECORD_LAYER *rl); __owur int ssl3_pending(const SSL *s); __owur size_t ssl3_pending(const SSL *s); __owur int ssl3_write_bytes(SSL *s, int type, const void *buf, size_t len, size_t *written); int do_ssl3_write(SSL *s, int type, const unsigned char *buf, Loading