Merge pull request #954 from jrblixt/asn_cSetKeyUsage-fix

Fix wc_SetKeyUsage() value error.
This commit is contained in:
toddouska 2017-06-12 10:48:56 -07:00 committed by GitHub
commit 894f4f6fa5

View File

@ -9446,7 +9446,9 @@ int wc_SetKeyUsage(Cert *cert, const char *value)
XSTRNCPY(str, value, XSTRLEN(value));
/* parse value, and set corresponding Key Usage value */
token = XSTRTOK(str, ",", &ptr);
if ((token = XSTRTOK(str, ",", &ptr)) == NULL) {
return KEYUSAGE_E;
}
while (token != NULL)
{
len = (word32)XSTRLEN(token);