Fix to not treat cert/key not found as error in myWatchCb and WOLFSSL_SNIFFER_WATCH. The key can be pased as argument to ./snifftest and if built with sniffer watch let's keep trying to parse instead of throwing an error.

This commit is contained in:
David Garske
2020-09-21 10:14:40 -07:00
parent 7e2d44ba9a
commit adedde7d16

View File

@ -267,8 +267,11 @@ static int myWatchCb(void* vSniffer,
certName = DEFAULT_SERVER_KEY_ECC;
}
if (certName == NULL)
return -1;
if (certName == NULL) {
/* don't return error if key is not loaded */
printf("Warning: No matching key found for cert hash\n");
return 0;
}
return ssl_SetWatchKey_file(vSniffer, certName, FILETYPE_PEM, NULL, error);
}