From 4302169025af51143df7d757eb8e5e0e2f21fcb3 Mon Sep 17 00:00:00 2001 From: achaulk-goog <107196446+achaulk-goog@users.noreply.github.com> Date: Fri, 2 Dec 2022 16:30:01 -0500 Subject: [PATCH] Fix -Wsign-conversion report in OpenSSL usage (#23839) * Fix -Wsign-conversion report in OpenSSL usage * Restyled by clang-format Co-authored-by: Restyled.io --- src/crypto/CHIPCryptoPALOpenSSL.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crypto/CHIPCryptoPALOpenSSL.cpp b/src/crypto/CHIPCryptoPALOpenSSL.cpp index f630aa40f4e9a2..8a24fde3c54fd4 100644 --- a/src/crypto/CHIPCryptoPALOpenSSL.cpp +++ b/src/crypto/CHIPCryptoPALOpenSSL.cpp @@ -1674,7 +1674,8 @@ CHIP_ERROR VerifyAttestationCertificateFormat(const ByteSpan & cert, Attestation { bool keyCertSignFlag = keyUsage & X509v3_KU_KEY_CERT_SIGN; bool crlSignFlag = keyUsage & X509v3_KU_CRL_SIGN; - bool otherFlags = keyUsage & ~(X509v3_KU_CRL_SIGN | X509v3_KU_KEY_CERT_SIGN | X509v3_KU_DIGITAL_SIGNATURE); + bool otherFlags = keyUsage & + ~static_cast(X509v3_KU_CRL_SIGN | X509v3_KU_KEY_CERT_SIGN | X509v3_KU_DIGITAL_SIGNATURE); VerifyOrExit(keyCertSignFlag && crlSignFlag && !otherFlags, err = CHIP_ERROR_INTERNAL); } }