From 0d10b631ea0e1cf5f91b666aaa3e48d71d89fa5e Mon Sep 17 00:00:00 2001 From: Chris Mc Date: Wed, 21 Apr 2021 08:50:42 -0400 Subject: [PATCH] :bug: Fix warning C4267 from STL to OpenSSL API (#141) --- include/jwt-cpp/jwt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/jwt-cpp/jwt.h b/include/jwt-cpp/jwt.h index bd3e6e9..edd0891 100644 --- a/include/jwt-cpp/jwt.h +++ b/include/jwt-cpp/jwt.h @@ -438,7 +438,8 @@ namespace jwt { const auto decodedStr = decode(cert_base64_der_str); auto c_str = reinterpret_cast(decodedStr.c_str()); - std::unique_ptr cert(d2i_X509(NULL, &c_str, decodedStr.size()), X509_free); + std::unique_ptr cert( + d2i_X509(NULL, &c_str, static_cast(decodedStr.size())), X509_free); std::unique_ptr certbio(BIO_new(BIO_s_mem()), BIO_free_all); if (!cert || !certbio) { ec = error::rsa_error::create_mem_bio_failed;