From: Yu Watanabe Date: Tue, 13 Sep 2022 08:03:01 +0000 (+0900) Subject: openssl-util: use assert() if no side effect X-Git-Tag: v252-rc1~204^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2e64df07b89e97368fc576ca2f2f6a87b04b8986;p=thirdparty%2Fsystemd.git openssl-util: use assert() if no side effect --- diff --git a/src/shared/openssl-util.c b/src/shared/openssl-util.c index 39019354349..e4ee09102cd 100644 --- a/src/shared/openssl-util.c +++ b/src/shared/openssl-util.c @@ -86,8 +86,8 @@ int rsa_pkey_to_suitable_key_size( size_t suitable_key_size; int bits; - assert_se(pkey); - assert_se(ret_suitable_key_size); + assert(pkey); + assert(ret_suitable_key_size); /* Analyzes the specified public key and that it is RSA. If so, will return a suitable size for a * disk encryption key to encrypt with RSA for use in PKCS#11 security token schemes. */ @@ -148,7 +148,7 @@ int pubkey_fingerprint(EVP_PKEY *pk, const EVP_MD *md, void **ret, size_t *ret_s return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Failed to run %s context.", EVP_MD_name(md)); msz = EVP_MD_size(md); - assert_se(msz > 0); + assert(msz > 0); h = malloc(msz); if (!h) @@ -158,7 +158,7 @@ int pubkey_fingerprint(EVP_PKEY *pk, const EVP_MD *md, void **ret, size_t *ret_s if (EVP_DigestFinal_ex(m, h, &umsz) != 1) return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Failed to finalize hash context."); - assert_se(umsz == (unsigned) msz); + assert(umsz == (unsigned) msz); *ret = TAKE_PTR(h); *ret_size = msz;