Skip to content

Commit 9730001

Browse files
gizmocuzThalhammer
andauthored
💄 Cast der_signature.length() to 'long' to silence compile warning (#270)
Co-authored-by: Dominik Thalhammer <[email protected]>
1 parent 649530a commit 9730001

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/jwt-cpp/jwt.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,8 @@ namespace jwt {
12151215
std::string der_to_p1363_signature(const std::string& der_signature, std::error_code& ec) const {
12161216
const unsigned char* possl_signature = reinterpret_cast<const unsigned char*>(der_signature.data());
12171217
std::unique_ptr<ECDSA_SIG, decltype(&ECDSA_SIG_free)> sig(
1218-
d2i_ECDSA_SIG(nullptr, &possl_signature, der_signature.length()), ECDSA_SIG_free);
1218+
d2i_ECDSA_SIG(nullptr, &possl_signature, static_cast<long>(der_signature.length())),
1219+
ECDSA_SIG_free);
12191220
if (!sig) {
12201221
ec = error::signature_generation_error::signature_decoding_failed;
12211222
return {};

0 commit comments

Comments
 (0)