From c581c56999071c3fb971327878b6f2e2ac96de7e Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 20 Jan 2020 10:40:56 -0700 Subject: [PATCH] update return value of local GetCurveByOID --- src/internal.c | 3 ++- wolfssl/internal.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/internal.c b/src/internal.c index 293f41405..624b4c765 100644 --- a/src/internal.c +++ b/src/internal.c @@ -23038,7 +23038,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, #ifdef HAVE_ECC /* returns the WOLFSSL_* version of the curve from the OID sum */ - unsigned char GetCurveByOID(int oidSum) { + word16 GetCurveByOID(int oidSum) { switch(oidSum) { #if defined(HAVE_ECC160) || defined(HAVE_ALL_CURVES) #ifndef NO_ECC_SECP @@ -23111,6 +23111,7 @@ static int DoSessionTicket(WOLFSSL* ssl, const byte* input, word32* inOutIdx, #endif /* !NO_ECC_SECP */ #endif default: + WOLFSSL_MSG("Curve OID not compiled in or implemented"); return 0; } } diff --git a/wolfssl/internal.h b/wolfssl/internal.h index d50fa52ba..34a59badb 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -4465,7 +4465,7 @@ WOLFSSL_LOCAL int SetKeysSide(WOLFSSL*, enum encrypt_side); #ifdef HAVE_ECC WOLFSSL_LOCAL int EccMakeKey(WOLFSSL* ssl, ecc_key* key, ecc_key* peer); - WOLFSSL_LOCAL unsigned char GetCurveByOID(int oidSum); + WOLFSSL_LOCAL word16 GetCurveByOID(int oidSum); #endif WOLFSSL_LOCAL int InitHandshakeHashes(WOLFSSL* ssl);