From 4e5002eb4392738858e5a55fff0eb549077a4fa9 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 13 Jun 2022 14:16:15 -0700 Subject: [PATCH] ircd::openssl: Fix argument narrowing from default constants. --- include/ircd/openssl.h | 6 +++--- ircd/openssl.cc | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/ircd/openssl.h b/include/ircd/openssl.h index 1ecdf2680..0a0f3670b 100644 --- a/include/ircd/openssl.h +++ b/include/ircd/openssl.h @@ -90,9 +90,9 @@ namespace ircd::openssl extern const size_t DH_DEFAULT_GEN; extern const size_t DH_DEFAULT_BITS; extern const string_view rfc3526_dh_params_pem; - DH &gendh(DH &, const uint &bits = DH_DEFAULT_BITS, const uint &gen = DH_DEFAULT_GEN); - string_view gendh(const mutable_buffer &, const uint &bits = DH_DEFAULT_BITS, const uint &gen = DH_DEFAULT_GEN); - void gendh(const string_view &dhfile, const uint &bits = DH_DEFAULT_BITS, const uint &gen = DH_DEFAULT_GEN); + DH &gendh(DH &, const size_t &bits = DH_DEFAULT_BITS, const size_t &gen = DH_DEFAULT_GEN); + string_view gendh(const mutable_buffer &, const size_t &bits = DH_DEFAULT_BITS, const size_t &gen = DH_DEFAULT_GEN); + void gendh(const string_view &dhfile, const size_t &bits = DH_DEFAULT_BITS, const size_t &gen = DH_DEFAULT_GEN); // X.509 suite const_buffer i2d(const mutable_buffer &out, const X509 &); diff --git a/ircd/openssl.cc b/ircd/openssl.cc index 4d6f7d37e..ca6fb472c 100644 --- a/ircd/openssl.cc +++ b/ircd/openssl.cc @@ -865,8 +865,8 @@ ircd::openssl::DH_DEFAULT_GEN void ircd::openssl::gendh(const string_view &dhfile, - const uint &bits, - const uint &gen) + const size_t &bits, + const size_t &gen) { bio::write_file(dhfile, [&bits, &gen] (const mutable_buffer &buf) @@ -877,8 +877,8 @@ ircd::openssl::gendh(const string_view &dhfile, ircd::string_view ircd::openssl::gendh(const mutable_buffer &buf, - const uint &bits, - const uint &gen) + const size_t &bits, + const size_t &gen) { const custom_ptr dh { @@ -895,8 +895,8 @@ ircd::openssl::gendh(const mutable_buffer &buf, DH & ircd::openssl::gendh(DH &dh, - const uint &bits, - const uint &gen) + const size_t &bits, + const size_t &gen) { #ifdef IRCD_OPENSSL_API_1_1_X const custom_ptr gencb