Skip to content

Commit

Permalink
Merge branch 'fix-conversion' of github.com:gasbytes/wolfssl into fix…
Browse files Browse the repository at this point in the history
…-conversion
  • Loading branch information
gasbytes committed Nov 26, 2024
2 parents a786306 + 584da13 commit ae87fa0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ int wolfSSL_get_ciphers(char* buf, int len)
for (i = 0; i < ciphersSz; i++) {
int cipherNameSz = (int)XSTRLEN(ciphers[i].name);
if (cipherNameSz + 1 < len) {
XSTRNCPY(buf, ciphers[i].name, (size_t)(len));
XSTRNCPY(buf, ciphers[i].name, (size_t)len);
buf += cipherNameSz;

if (i < ciphersSz - 1)
Expand Down Expand Up @@ -1708,7 +1708,7 @@ const char* wolfSSL_get_shared_ciphers(WOLFSSL* ssl, char* buf, int len)

cipher = wolfSSL_get_cipher_name_iana(ssl);
len = (int)min((word32)len, (word32)(XSTRLEN(cipher) + 1));
XMEMCPY(buf, cipher, (size_t)(len));
XMEMCPY(buf, cipher, len);
return buf;
}

Expand Down
2 changes: 1 addition & 1 deletion src/ssl_sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ int wolfSSL_SetServerID(WOLFSSL* ssl, const byte* id, int len, int newSession)
WOLFSSL_MSG("Valid ServerID not cached already");

ssl->session->idLen = (word16)len;
XMEMCPY(ssl->session->serverID, id, (size_t)(len));
XMEMCPY(ssl->session->serverID, id, (size_t)len);
}
#ifdef HAVE_EXT_CACHE
else {
Expand Down
4 changes: 2 additions & 2 deletions src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1190,8 +1190,8 @@ static int Hmac_UpdateFinal(Hmac* hmac, byte* digest, const byte* in,
ret = wc_HmacUpdate(hmac, header, headerSz);
if (ret == 0) {
/* Fill the rest of the block with any available data. */
word32 currSz = ctMaskLT((int)(msgSz), (int)(blockSz)) & msgSz;
currSz |= ctMaskGTE((int)(msgSz), (int)(blockSz)) & blockSz;
word32 currSz = ctMaskLT((int)msgSz, blockSz) & msgSz;
currSz |= ctMaskGTE((int)msgSz, blockSz) & blockSz;
currSz -= WOLFSSL_TLS_HMAC_INNER_SZ;
currSz &= ~(0 - (currSz >> 31));
ret = wc_HmacUpdate(hmac, in, currSz);
Expand Down

0 comments on commit ae87fa0

Please sign in to comment.