mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
Example Client OCSP Option Fix
1. Before checking to see if the must staple flag is on the 'W' option, check the length of myoptarg.
This commit is contained in:
@@ -1944,15 +1944,21 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
|
|||||||
case 'W' :
|
case 'W' :
|
||||||
#if defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
|
#if defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
|
||||||
|| defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
|
|| defined(HAVE_CERTIFICATE_STATUS_REQUEST_V2)
|
||||||
|
{
|
||||||
|
word32 myoptargSz;
|
||||||
|
|
||||||
statusRequest = atoi(myoptarg);
|
statusRequest = atoi(myoptarg);
|
||||||
if (statusRequest > OCSP_STAPLING_OPT_MAX) {
|
if (statusRequest > OCSP_STAPLING_OPT_MAX) {
|
||||||
Usage();
|
Usage();
|
||||||
XEXIT_T(MY_EX_USAGE);
|
XEXIT_T(MY_EX_USAGE);
|
||||||
}
|
}
|
||||||
if (myoptarg[XSTRLEN(myoptarg)-1] == 'M' ||
|
|
||||||
myoptarg[XSTRLEN(myoptarg)-1] == 'm') {
|
myoptargSz = (word32)XSTRLEN(myoptarg);
|
||||||
|
if (myoptargSz > 0 &&
|
||||||
|
XTOUPPER(myoptarg[myoptargSz-1]) == 'M') {
|
||||||
mustStaple = 1;
|
mustStaple = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user