From d68eb12ee61e08c6c69ab486be58bf4da42988c2 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Tue, 7 Jul 2015 22:10:26 -0600 Subject: [PATCH] use macros in TLSX Write with QSH --- src/tls.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/tls.c b/src/tls.c index e73bb7d72..78da2efa5 100644 --- a/src/tls.c +++ b/src/tls.c @@ -2616,12 +2616,16 @@ int TLSX_UseQSHScheme(TLSX** extensions, word16 name, byte* pKey, word16 pkeySz) #define QSH_PARSE(a, b, c, d) 0 #endif +#define QSHPK_WRITE TLSX_QSHPK_Write +#define QSH_SERREQ TLSX_QSH_SerPKReq #else #define QSH_FREE_ALL(list) #define QSH_GET_SIZE(list, a) 0 #define QSH_WRITE(a, b) 0 #define QSH_PARSE(a, b, c, d) 0 +#define QSHPK_WRITE(a, b) 0 +#define QSH_SERREQ(a, b) 0 #define QSH_VALIDATE_REQUEST(a, b) #endif /* HAVE_QSH */ @@ -2805,8 +2809,8 @@ static word16 TLSX_Write(TLSX* list, byte* output, byte* semaphore, if (isRequest) { offset += QSH_WRITE(extension->data, output + offset); } - offset += TLSX_QSHPK_Write(extension->data, output + offset); - offset += TLSX_QSH_SerPKReq(output + offset, isRequest); + offset += QSHPK_WRITE(extension->data, output + offset); + offset += QSH_SERREQ(output + offset, isRequest); break; } @@ -3014,7 +3018,6 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer) QSHScheme* next; #endif int ret = 0; - (void)isServer; #ifdef HAVE_QSH /* add supported QSHSchemes */ @@ -3091,6 +3094,11 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer) } /* is not server */ #endif + (void)isServer; + (void)public_key; + (void)public_key_len; + (void)ssl; + return ret; }