Skip to content

Commit

Permalink
fixup 4
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Apr 25, 2024
1 parent de33cf3 commit 6b0fea4
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions lib/vtls/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5134,19 +5134,20 @@ static size_t ossl_version(char *buffer, size_t size)
#endif
#elif defined(OPENSSL_IS_BORINGSSL)
#ifdef CURL_BORINGSSL_VERSION
return msnprintf(buffer, size, "%s/%s",
OSSL_PACKAGE,
CURL_BORINGSSL_VERSION);
return (size_t)msnprintf(buffer, size, "%s/%s",
OSSL_PACKAGE,
CURL_BORINGSSL_VERSION);
#else
return msnprintf(buffer, size, OSSL_PACKAGE);
return (size_t)msnprintf(buffer, size, OSSL_PACKAGE);
#endif
#elif defined(OPENSSL_IS_AWSLC)
return msnprintf(buffer, size, "%s/%s",
OSSL_PACKAGE,
AWSLC_VERSION_NUMBER_STRING);
return (size_t)msnprintf(buffer, size, "%s/%s",
OSSL_PACKAGE,
AWSLC_VERSION_NUMBER_STRING);
#elif defined(HAVE_OPENSSL_VERSION) && defined(OPENSSL_VERSION_STRING)
return msnprintf(buffer, size, "%s/%s",
OSSL_PACKAGE, OpenSSL_version(OPENSSL_VERSION_STRING));
return (size_t)msnprintf(buffer, size, "%s/%s",
OSSL_PACKAGE,
OpenSSL_version(OPENSSL_VERSION_STRING));
#else
/* not LibreSSL, BoringSSL and not using OpenSSL_version */

Expand Down Expand Up @@ -5175,16 +5176,16 @@ static size_t ossl_version(char *buffer, size_t size)
sub[0]='\0';
}

return msnprintf(buffer, size, "%s/%lx.%lx.%lx%s"
return (size_t)msnprintf(buffer, size, "%s/%lx.%lx.%lx%s"
#ifdef OPENSSL_FIPS
"-fips"
#endif
,
OSSL_PACKAGE,
(ssleay_value>>28)&0xf,
(ssleay_value>>20)&0xff,
(ssleay_value>>12)&0xff,
sub);
"-fips"
#endif
,
OSSL_PACKAGE,
(ssleay_value>>28)&0xf,
(ssleay_value>>20)&0xff,
(ssleay_value>>12)&0xff,
sub);
#endif /* OPENSSL_IS_BORINGSSL */
}

Expand Down

0 comments on commit 6b0fea4

Please sign in to comment.