Skip to content

Commit

Permalink
Various style fixes from the TLSv1.3 record changes review
Browse files Browse the repository at this point in the history
Reviewed-by: Rich Salz <rsalz@openssl.org>
  • Loading branch information
mattcaswell committed Dec 5, 2016
1 parent 8885886 commit 829754a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ssl/packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ int WPACKET_reserve_bytes(WPACKET *pkt, size_t len, unsigned char **allocbytes)
return 0;
}
if (allocbytes != NULL)
*allocbytes = GETBUF(pkt) + pkt->curr;
*allocbytes = WPACKET_get_curr(pkt);

return 1;
}
Expand Down
8 changes: 2 additions & 6 deletions ssl/record/rec_layer_s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
unsigned char *recordstart;
int i, mac_size, clear = 0;
size_t prefix_len = 0;
int eivlen;
int eivlen = 0;
size_t align = 0;
SSL3_BUFFER *wb;
SSL_SESSION *sess;
Expand Down Expand Up @@ -748,7 +748,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
} else {
for (j = 0; j < numpipes; j++) {
wb = &s->rlayer.wbuf[j];
#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD!=0
#if defined(SSL3_ALIGN_PAYLOAD) && SSL3_ALIGN_PAYLOAD != 0
align = (size_t)SSL3_BUFFER_get_buf(wb) + SSL3_RT_HEADER_LENGTH;
align = SSL3_ALIGN_PAYLOAD - 1 - ((align - 1) % SSL3_ALIGN_PAYLOAD);
#endif
Expand Down Expand Up @@ -776,11 +776,7 @@ int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
eivlen = EVP_GCM_TLS_EXPLICIT_IV_LEN;
} else if (mode == EVP_CIPH_CCM_MODE) {
eivlen = EVP_CCM_TLS_EXPLICIT_IV_LEN;
} else {
eivlen = 0;
}
} else {
eivlen = 0;
}

totlen = 0;
Expand Down

0 comments on commit 829754a

Please sign in to comment.