From 3d94a4174046e6ebed87adcc297c8b32a6a36ac4 Mon Sep 17 00:00:00 2001 From: Joseph Spadavecchia Date: Tue, 3 Jun 2014 10:58:22 +0100 Subject: [PATCH 1/2] Increased max AltName buffer size (for cert generation) --- cyassl/ctaocrypt/asn_public.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cyassl/ctaocrypt/asn_public.h b/cyassl/ctaocrypt/asn_public.h index 8873fcaf2..34c899dc0 100644 --- a/cyassl/ctaocrypt/asn_public.h +++ b/cyassl/ctaocrypt/asn_public.h @@ -75,10 +75,10 @@ enum Ctc_Encoding { #endif enum Ctc_Misc { - CTC_NAME_SIZE = 64, - CTC_DATE_SIZE = 32, - CTC_MAX_ALT_SIZE = 8192, /* may be huge */ - CTC_SERIAL_SIZE = 8 + CTC_NAME_SIZE = 64, + CTC_DATE_SIZE = 32, + CTC_MAX_ALT_SIZE = 16384, /* may be huge */ + CTC_SERIAL_SIZE = 8 }; typedef struct CertName { From d301ab001ceb36483c0f04b75b4c7bd47a8d3f9e Mon Sep 17 00:00:00 2001 From: John Safranek Date: Tue, 3 Jun 2014 23:11:18 -0700 Subject: [PATCH 2/2] fix Windows compile warnings --- src/internal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/internal.c b/src/internal.c index e79670d15..37f663f67 100644 --- a/src/internal.c +++ b/src/internal.c @@ -4105,7 +4105,7 @@ static INLINE int DtlsCheckWindow(DtlsState* state) if ((next > DTLS_SEQ_BITS) && (cur < next - DTLS_SEQ_BITS)) { return 0; } - else if ((cur < next) && (window & (1 << (next - cur - 1)))) { + else if ((cur < next) && (window & ((DtlsSeq)1 << (next - cur - 1)))) { return 0; } @@ -4131,7 +4131,7 @@ static INLINE int DtlsUpdateWindow(DtlsState* state) cur = state->curSeq; if (cur < *next) { - *window |= (1 << (*next - cur - 1)); + *window |= ((DtlsSeq)1 << (*next - cur - 1)); } else { *window <<= (1 + cur - *next); @@ -8683,7 +8683,7 @@ static void PickHashSigAlgo(CYASSL* ssl, if (esSz > MAX_PSK_ID_LEN) return CLIENT_ID_ERROR; - c16toa(esSz, es); + c16toa((word16)esSz, es); es += OPAQUE16_LEN; XMEMCPY(es, ssl->arrays->client_identity, esSz); es += esSz; @@ -11757,7 +11757,7 @@ static void PickHashSigAlgo(CYASSL* ssl, FreeDhKey(&dhKey); *inOutIdx += clientSz; - c16toa(ssl->arrays->preMasterSz, pms); + c16toa((word16)ssl->arrays->preMasterSz, pms); ssl->arrays->preMasterSz += OPAQUE16_LEN; pms += ssl->arrays->preMasterSz;