update return value of local GetCurveByOID

This commit is contained in:
Jacob Barthelmeh
2020-01-20 10:40:56 -07:00
parent 356636e88d
commit c581c56999
2 changed files with 3 additions and 2 deletions

View File

@@ -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;
}
}

View File

@@ -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);