Update misc function params in libssl for size_t
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
6db6bc5a8f
commit
d736bc1a7d
4 changed files with 12 additions and 11 deletions
|
@ -1934,8 +1934,8 @@ __owur long tls1_default_timeout(void);
|
|||
__owur int dtls1_do_write(SSL *s, int type);
|
||||
void dtls1_set_message_header(SSL *s,
|
||||
unsigned char mt,
|
||||
unsigned long len,
|
||||
unsigned long frag_off, unsigned long frag_len);
|
||||
size_t len,
|
||||
size_t frag_off, size_t frag_len);
|
||||
|
||||
int dtls1_write_app_data_bytes(SSL *s, int type, const void *buf_, size_t len,
|
||||
size_t *written);
|
||||
|
@ -2037,7 +2037,7 @@ __owur int ssl_prepare_serverhello_tlsext(SSL *s);
|
|||
# ifndef OPENSSL_NO_HEARTBEATS
|
||||
__owur int dtls1_heartbeat(SSL *s);
|
||||
__owur int dtls1_process_heartbeat(SSL *s, unsigned char *p,
|
||||
unsigned int length);
|
||||
size_t length);
|
||||
# endif
|
||||
|
||||
__owur int tls_check_serverhello_tlsext_early(SSL *s, const PACKET *ext,
|
||||
|
@ -2077,7 +2077,7 @@ __owur int ssl_parse_clienthello_renegotiate_ext(SSL *s, PACKET *pkt, int *al);
|
|||
__owur long ssl_get_algorithm2(SSL *s);
|
||||
__owur int tls12_copy_sigalgs(SSL *s, WPACKET *pkt,
|
||||
const unsigned char *psig, size_t psiglen);
|
||||
__owur int tls1_save_sigalgs(SSL *s, const unsigned char *data, int dsize);
|
||||
__owur int tls1_save_sigalgs(SSL *s, const unsigned char *data, size_t dsize);
|
||||
__owur int tls1_process_sigalgs(SSL *s);
|
||||
__owur size_t tls12_get_psigalgs(SSL *s, const unsigned char **psigs);
|
||||
__owur int tls12_check_peer_sigalg(const EVP_MD **pmd, SSL *s,
|
||||
|
|
|
@ -1780,7 +1780,7 @@ MSG_PROCESS_RETURN tls_process_certificate_request(SSL *s, PACKET *pkt)
|
|||
goto err;
|
||||
}
|
||||
memcpy(s->cert->ctypes, data, ctype_num);
|
||||
s->cert->ctype_num = (size_t)ctype_num;
|
||||
s->cert->ctype_num = ctype_num;
|
||||
ctype_num = SSL3_CT_NUMBER;
|
||||
}
|
||||
for (i = 0; i < ctype_num; i++)
|
||||
|
|
|
@ -1119,8 +1119,8 @@ int dtls1_retransmit_message(SSL *s, unsigned short seq, int *found)
|
|||
}
|
||||
|
||||
void dtls1_set_message_header(SSL *s,
|
||||
unsigned char mt, unsigned long len,
|
||||
unsigned long frag_off, unsigned long frag_len)
|
||||
unsigned char mt, size_t len,
|
||||
size_t frag_off, size_t frag_len)
|
||||
{
|
||||
if (frag_off == 0) {
|
||||
s->d1->handshake_write_seq = s->d1->next_handshake_write_seq;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "ssl_locl.h"
|
||||
#include <openssl/ct.h>
|
||||
|
||||
static int tls_decrypt_ticket(SSL *s, const unsigned char *tick, int ticklen,
|
||||
static int tls_decrypt_ticket(SSL *s, const unsigned char *tick, size_t ticklen,
|
||||
const unsigned char *sess_id, size_t sesslen,
|
||||
SSL_SESSION **psess);
|
||||
static int ssl_check_clienthello_tlsext_early(SSL *s);
|
||||
|
@ -2963,7 +2963,7 @@ int tls_check_serverhello_tlsext_early(SSL *s, const PACKET *ext,
|
|||
* 4: same as 3, but the ticket needs to be renewed.
|
||||
*/
|
||||
static int tls_decrypt_ticket(SSL *s, const unsigned char *etick,
|
||||
int eticklen, const unsigned char *sess_id,
|
||||
size_t eticklen, const unsigned char *sess_id,
|
||||
size_t sesslen, SSL_SESSION **psess)
|
||||
{
|
||||
SSL_SESSION *sess;
|
||||
|
@ -3017,13 +3017,14 @@ static int tls_decrypt_ticket(SSL *s, const unsigned char *etick,
|
|||
* Attempt to process session ticket, first conduct sanity and integrity
|
||||
* checks on ticket.
|
||||
*/
|
||||
/* TODO(size_t) : convert me */
|
||||
mlen = HMAC_size(hctx);
|
||||
if (mlen < 0) {
|
||||
goto err;
|
||||
}
|
||||
/* Sanity check ticket length: must exceed keyname + IV + HMAC */
|
||||
if (eticklen <=
|
||||
TLSEXT_KEYNAME_LENGTH + EVP_CIPHER_CTX_iv_length(ctx) + mlen) {
|
||||
TLSEXT_KEYNAME_LENGTH + EVP_CIPHER_CTX_iv_length(ctx) + (size_t)mlen) {
|
||||
ret = 2;
|
||||
goto err;
|
||||
}
|
||||
|
@ -3411,7 +3412,7 @@ static int tls1_set_shared_sigalgs(SSL *s)
|
|||
|
||||
/* Set preferred digest for each key type */
|
||||
|
||||
int tls1_save_sigalgs(SSL *s, const unsigned char *data, int dsize)
|
||||
int tls1_save_sigalgs(SSL *s, const unsigned char *data, size_t dsize)
|
||||
{
|
||||
CERT *c = s->cert;
|
||||
/* Extension ignored for inappropriate versions */
|
||||
|
|
Loading…
Reference in a new issue