forked from wolfSSL/wolfssl
use macros in TLSX Write with QSH
This commit is contained in:
14
src/tls.c
14
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
|
#define QSH_PARSE(a, b, c, d) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define QSHPK_WRITE TLSX_QSHPK_Write
|
||||||
|
#define QSH_SERREQ TLSX_QSH_SerPKReq
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define QSH_FREE_ALL(list)
|
#define QSH_FREE_ALL(list)
|
||||||
#define QSH_GET_SIZE(list, a) 0
|
#define QSH_GET_SIZE(list, a) 0
|
||||||
#define QSH_WRITE(a, b) 0
|
#define QSH_WRITE(a, b) 0
|
||||||
#define QSH_PARSE(a, b, c, d) 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)
|
#define QSH_VALIDATE_REQUEST(a, b)
|
||||||
|
|
||||||
#endif /* HAVE_QSH */
|
#endif /* HAVE_QSH */
|
||||||
@ -2805,8 +2809,8 @@ static word16 TLSX_Write(TLSX* list, byte* output, byte* semaphore,
|
|||||||
if (isRequest) {
|
if (isRequest) {
|
||||||
offset += QSH_WRITE(extension->data, output + offset);
|
offset += QSH_WRITE(extension->data, output + offset);
|
||||||
}
|
}
|
||||||
offset += TLSX_QSHPK_Write(extension->data, output + offset);
|
offset += QSHPK_WRITE(extension->data, output + offset);
|
||||||
offset += TLSX_QSH_SerPKReq(output + offset, isRequest);
|
offset += QSH_SERREQ(output + offset, isRequest);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3014,7 +3018,6 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer)
|
|||||||
QSHScheme* next;
|
QSHScheme* next;
|
||||||
#endif
|
#endif
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
(void)isServer;
|
|
||||||
|
|
||||||
#ifdef HAVE_QSH
|
#ifdef HAVE_QSH
|
||||||
/* add supported QSHSchemes */
|
/* add supported QSHSchemes */
|
||||||
@ -3091,6 +3094,11 @@ int TLSX_PopulateExtensions(WOLFSSL* ssl, byte isServer)
|
|||||||
} /* is not server */
|
} /* is not server */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
(void)isServer;
|
||||||
|
(void)public_key;
|
||||||
|
(void)public_key_len;
|
||||||
|
(void)ssl;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user