diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-11-13 20:47:17 +0100 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2023-11-13 20:47:17 +0100 |
commit | 968d232db5ff413606400882b1115d00eb3ef32d (patch) | |
tree | 1b5a4c62a63a48c3d03b8e0b4461a1086e899564 /src/shared/openssl-util.c | |
parent | test: skip --tpm2-device-key= tests with older OpenSSL (diff) | |
download | systemd-968d232db5ff413606400882b1115d00eb3ef32d.tar.xz systemd-968d232db5ff413606400882b1115d00eb3ef32d.zip |
tree-wide: unify OpenSSL spelling in log messages
Seeing three different spellings of OpenSSL in one log file triggers
some inner OCD I didn't even know I have.
Diffstat (limited to 'src/shared/openssl-util.c')
-rw-r--r-- | src/shared/openssl-util.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/shared/openssl-util.c b/src/shared/openssl-util.c index fcf7474edc..311fb4d9cb 100644 --- a/src/shared/openssl-util.c +++ b/src/shared/openssl-util.c @@ -7,8 +7,8 @@ #include "string-util.h" #if HAVE_OPENSSL -/* For each error in the the Openssl thread error queue, log the provided message and the Openssl error - * string. If there are no errors in the Openssl thread queue, this logs the message with "No openssl +/* For each error in the the OpenSSL thread error queue, log the provided message and the OpenSSL error + * string. If there are no errors in the OpenSSL thread queue, this logs the message with "No openssl * errors." This logs at level debug. Returns -EIO (or -ENOMEM). */ #define log_openssl_errors(fmt, ...) _log_openssl_errors(UNIQ, fmt, ##__VA_ARGS__) #define _log_openssl_errors(u, fmt, ...) \ @@ -18,7 +18,7 @@ !UNIQ_T(BUF, u) \ ? log_oom_debug() \ : __log_openssl_errors(u, UNIQ_T(BUF, u), UNIQ_T(MAX, u), fmt, ##__VA_ARGS__) \ - ?: log_debug_errno(SYNTHETIC_ERRNO(EIO), fmt ": No openssl errors.", ##__VA_ARGS__); \ + ?: log_debug_errno(SYNTHETIC_ERRNO(EIO), fmt ": No OpenSSL errors.", ##__VA_ARGS__); \ }) #define __log_openssl_errors(u, buf, max, fmt, ...) \ ({ \ @@ -394,18 +394,18 @@ int kdf_ss_derive( return log_openssl_errors("Failed to build KDF-SS OSSL_PARAM"); if (EVP_KDF_derive(ctx, buf, derive_size, params) <= 0) - return log_openssl_errors("Openssl KDF-SS derive failed"); + return log_openssl_errors("OpenSSL KDF-SS derive failed"); *ret = TAKE_PTR(buf); return 0; #else - return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "KDF-SS requires openssl >= 3."); + return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "KDF-SS requires OpenSSL >= 3."); #endif } /* Perform Key-Based HMAC KDF. The mode must be "COUNTER" or "FEEDBACK". The parameter naming is from the - * Openssl api, and maps to SP800-108 naming as "...key, salt, info, and seed correspond to KI, Label, + * OpenSSL api, and maps to SP800-108 naming as "...key, salt, info, and seed correspond to KI, Label, * Context, and IV (respectively)...". The derive_size parameter specifies how many bytes are derived. * * For more details see: https://www.openssl.org/docs/manmaster/man7/EVP_KDF-KB.html */ @@ -480,13 +480,13 @@ int kdf_kb_hmac_derive( return log_oom_debug(); if (EVP_KDF_derive(ctx, buf, derive_size, params) <= 0) - return log_openssl_errors("Openssl KDF-KB derive failed"); + return log_openssl_errors("OpenSSL KDF-KB derive failed"); *ret = TAKE_PTR(buf); return 0; #else - return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "KDF-KB requires openssl >= 3."); + return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "KDF-KB requires OpenSSL >= 3."); #endif } @@ -1144,6 +1144,6 @@ int x509_fingerprint(X509 *cert, uint8_t buffer[static SHA256_DIGEST_SIZE]) { sha256_direct(der, dersz, buffer); return 0; #else - return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "openssl is not supported, cannot calculate X509 fingerprint: %m"); + return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "OpenSSL is not supported, cannot calculate X509 fingerprint: %m"); #endif } |