From b28c26d965fe6870cd8eaaf7b935062ab0e7e5d1 Mon Sep 17 00:00:00 2001 From: Aaron Jones Date: Wed, 27 Apr 2016 21:49:55 +0000 Subject: [PATCH] Partially revert previous commit The OpenSSL backend is the only one that assigns a non-constant value to the length variable. Use the correct type for its pointer and cast instead. [ci skip] --- librb/src/openssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/librb/src/openssl.c b/librb/src/openssl.c index 2b53f337..fc5d300f 100644 --- a/librb/src/openssl.c +++ b/librb/src/openssl.c @@ -716,7 +716,7 @@ make_certfp(X509 *cert, uint8_t certfp[RB_SSL_CERTFP_LEN], int method) const ASN1_ITEM *it; const EVP_MD *evp; void *data; - int len; + unsigned int len; switch(method) { @@ -756,7 +756,7 @@ make_certfp(X509 *cert, uint8_t certfp[RB_SSL_CERTFP_LEN], int method) if (ASN1_item_digest(it, evp, data, certfp, &len) != 1) len = 0; - return len; + return (int) len; } int