fix for pkcs11 found running build_test.pl script

This commit is contained in:
Jacob Barthelmeh
2019-10-15 10:25:46 -06:00
parent 95c036a08a
commit 4bde06fbe3

View File

@@ -1326,7 +1326,7 @@ static int Pkcs11GetEccPublicKey(ecc_key* key, Pkcs11Session* session,
CK_OBJECT_HANDLE pubKey) CK_OBJECT_HANDLE pubKey)
{ {
int ret = 0; int ret = 0;
int i = 0; word32 i = 0;
int curveIdx; int curveIdx;
unsigned char* point = NULL; unsigned char* point = NULL;
int pointSz; int pointSz;
@@ -1670,6 +1670,7 @@ static int Pkcs11ECDSASig_Decode(const byte* in, word32 inSz, byte* sig,
{ {
int ret = 0; int ret = 0;
word32 i = 0; word32 i = 0;
byte tag;
int len, seqLen = 2; int len, seqLen = 2;
/* Make sure zeros in place when decoding short integers. */ /* Make sure zeros in place when decoding short integers. */
@@ -1695,7 +1696,7 @@ static int Pkcs11ECDSASig_Decode(const byte* in, word32 inSz, byte* sig,
/* Check INT */ /* Check INT */
if (ret == 0 && GetASNTag(in, &i, &tag, inSz) != 0) if (ret == 0 && GetASNTag(in, &i, &tag, inSz) != 0)
ret = ASN_PARSE_E; ret = ASN_PARSE_E;
if (ret == 0 && tag != ASN_INTGER) if (ret == 0 && tag != ASN_INTEGER)
ret = ASN_PARSE_E; ret = ASN_PARSE_E;
if (ret == 0 && (len = in[i++]) > sz + 1) if (ret == 0 && (len = in[i++]) > sz + 1)
ret = ASN_PARSE_E; ret = ASN_PARSE_E;
@@ -1719,7 +1720,7 @@ static int Pkcs11ECDSASig_Decode(const byte* in, word32 inSz, byte* sig,
/* Check INT */ /* Check INT */
if (ret == 0 && GetASNTag(in, &i, &tag, inSz) != 0) if (ret == 0 && GetASNTag(in, &i, &tag, inSz) != 0)
ret = ASN_PARSE_E; ret = ASN_PARSE_E;
if (ret == 0 && tag != ASN_INTGER) if (ret == 0 && tag != ASN_INTEGER)
ret = ASN_PARSE_E; ret = ASN_PARSE_E;
if (ret == 0 && (len = in[i++]) > sz + 1) if (ret == 0 && (len = in[i++]) > sz + 1)
ret = ASN_PARSE_E; ret = ASN_PARSE_E;