From edf631898568e5fc024cd1aedf4c8d2620bc3d8f Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Thu, 28 Feb 2019 09:31:17 +1000 Subject: [PATCH] PKCS#11 casting fix for clang --- wolfcrypt/src/wc_pkcs11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/wc_pkcs11.c b/wolfcrypt/src/wc_pkcs11.c index bd3133464..cd57c0468 100644 --- a/wolfcrypt/src/wc_pkcs11.c +++ b/wolfcrypt/src/wc_pkcs11.c @@ -1759,7 +1759,7 @@ static int Pkcs11GetEccParams(Pkcs11Session* session, CK_OBJECT_HANDLE privKey, if (ret == 0) { /* PKCS #11 wraps the OID in ASN.1 */ curveId = wc_ecc_get_curve_id_from_oid(oid + 2, - template[0].ulValueLen - 2); + (word32)template[0].ulValueLen - 2); if (curveId == ECC_CURVE_INVALID) ret = WC_HW_E; }