Fixes for errors using cppcheck

This commit is contained in:
Sean Parkinson 2019-10-30 14:48:21 +10:00
parent 6bc16a4acb
commit c354b240f2
2 changed files with 3 additions and 2 deletions

View File

@ -82,7 +82,8 @@ int main(int argc, char** argv)
/* Load client certificates into WOLFSSL_CTX */
ret = wolfSSL_CTX_load_verify_buffer(ctx, CERT, SIZEOF_CERT, WOLFSSL_FILETYPE_ASN1);
if (ret != SSL_SUCCESS) {
fprintf(stderr, "ERROR: failed to load %s, please check the buffer.\n");
fprintf(stderr, "ERROR: failed to load client certificate, "
"please check the buffer.\n");
util_Cleanup(sockfd,ctx,ssl);
return -1;
}

View File

@ -12293,7 +12293,7 @@ int wc_PKCS7_DecodeCompressedData(PKCS7* pkcs7, byte* pkiMsg, word32 pkiMsgSz,
}
/* get ContentInfo content EXPLICIT SEQUENCE */
if (GetASNTag(pkiMsg, &idx, &tag, pkiMsgSz < 0)
if (GetASNTag(pkiMsg, &idx, &tag, pkiMsgSz) < 0)
return ASN_PARSE_E;
if (tag != (ASN_CONSTRUCTED | ASN_CONTEXT_SPECIFIC | 0))