Commit b43d1cbb authored by Matt Caswell's avatar Matt Caswell
Browse files

Convert various mac_secret_size usage to size_t



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent d0e7c31d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1144,9 +1144,9 @@ struct ssl_st {

typedef struct ssl3_state_st {
    long flags;
    int read_mac_secret_size;
    size_t read_mac_secret_size;
    unsigned char read_mac_secret[EVP_MAX_MD_SIZE];
    int write_mac_secret_size;
    size_t write_mac_secret_size;
    unsigned char write_mac_secret[EVP_MAX_MD_SIZE];
    unsigned char server_random[SSL3_RANDOM_SIZE];
    unsigned char client_random[SSL3_RANDOM_SIZE];
@@ -1205,7 +1205,7 @@ typedef struct ssl3_state_st {
        const EVP_CIPHER *new_sym_enc;
        const EVP_MD *new_hash;
        int new_mac_pkey_type;
        int new_mac_secret_size;
        size_t new_mac_secret_size;
# ifndef OPENSSL_NO_COMP
        const SSL_COMP *new_compression;
# else
+3 −2
Original line number Diff line number Diff line
@@ -116,10 +116,10 @@ int tls1_change_cipher_state(SSL *s, int which)
#endif
    const EVP_MD *m;
    int mac_type;
    int *mac_secret_size;
    size_t *mac_secret_size;
    EVP_MD_CTX *mac_ctx;
    EVP_PKEY *mac_key;
    int n, i, j, k, cl;
    size_t n, i, j, k, cl;
    int reuse_dd = 0;

    c = s->s3->tmp.new_sym_enc;
@@ -214,6 +214,7 @@ int tls1_change_cipher_state(SSL *s, int which)
    p = s->s3->tmp.key_block;
    i = *mac_secret_size = s->s3->tmp.new_mac_secret_size;

    /* TODO(size_t): convert me */
    cl = EVP_CIPHER_key_length(c);
    j = cl;
    /* Was j=(exp)?5:EVP_CIPHER_key_length(c); */