diff options
author | J.W. Jagersma <jwjagersma@gmail.com> | 2022-10-01 18:41:44 +0200 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2022-11-14 08:47:53 +0100 |
commit | 1555c86e5f7e3c46b4f696ed665c2f988976b81f (patch) | |
tree | f7f131a40e8f3f4ea2e24206ad7762a00fd7f0c0 /ssl/ssl_ciph.c | |
parent | Resign test/certs/rootCA.pem to expire in 100 years (diff) | |
download | openssl-1555c86e5f7e3c46b4f696ed665c2f988976b81f.tar.xz openssl-1555c86e5f7e3c46b4f696ed665c2f988976b81f.zip |
Cast values to match printf format strings.
For some reason djgpp uses '(unsigned) long int' for (u)int32_t. This
causes errors with -Werror=format, even though these types are in
practice identical.
Obvious solution: cast to the types indicated by the format string.
For asn1_time_test.c I changed the format string to %lli since time_t
may be 'long long' some platforms.
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19322)
Diffstat (limited to 'ssl/ssl_ciph.c')
-rw-r--r-- | ssl/ssl_ciph.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 48aad6342b..8c805fbfcf 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -820,8 +820,9 @@ static void ssl_cipher_apply_rule(uint32_t cipher_id, uint32_t alg_mkey, OSSL_TRACE_BEGIN(TLS_CIPHER) { BIO_printf(trc_out, "Applying rule %d with %08x/%08x/%08x/%08x/%08x %08x (%d)\n", - rule, alg_mkey, alg_auth, alg_enc, alg_mac, min_tls, - algo_strength, strength_bits); + rule, (unsigned int)alg_mkey, (unsigned int)alg_auth, + (unsigned int)alg_enc, (unsigned int)alg_mac, min_tls, + (unsigned int)algo_strength, (int)strength_bits); } if (rule == CIPHER_DEL || rule == CIPHER_BUMP) @@ -865,9 +866,13 @@ static void ssl_cipher_apply_rule(uint32_t cipher_id, uint32_t alg_mkey, BIO_printf(trc_out, "\nName: %s:" "\nAlgo = %08x/%08x/%08x/%08x/%08x Algo_strength = %08x\n", - cp->name, cp->algorithm_mkey, cp->algorithm_auth, - cp->algorithm_enc, cp->algorithm_mac, cp->min_tls, - cp->algo_strength); + cp->name, + (unsigned int)cp->algorithm_mkey, + (unsigned int)cp->algorithm_auth, + (unsigned int)cp->algorithm_enc, + (unsigned int)cp->algorithm_mac, + cp->min_tls, + (unsigned int)cp->algo_strength); } if (cipher_id != 0 && (cipher_id != cp->id)) continue; |