return 0;
#else
- return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "openssl is not supported, cannot setup verity signature: %m");
+ return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "OpenSSL is not supported, cannot setup verity signature: %m");
#endif
}
return 0;
#else
- return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "openssl is not supported, cannot parse X509 certificate.");
+ return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "OpenSSL is not supported, cannot parse X509 certificate.");
#endif
}
return 0;
#else
- return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "openssl is not supported, cannot parse private key.");
+ return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), "OpenSSL is not supported, cannot parse private key.");
#endif
}
#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, ...) \
!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, ...) \
({ \
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 */
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
}
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
}
}
return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
- "Openssl ECC curve id %d not supported.", openssl_ecc_curve_id);
+ "OpenSSL ECC curve id %d not supported.", openssl_ecc_curve_id);
}
static int tpm2_ecc_curve_to_openssl_curve_id(TPM2_ECC_CURVE tpm2_ecc_curve_id, int *ret) {
_cleanup_(EVP_PKEY_freep) EVP_PKEY *parent_pkey = NULL;
r = tpm2_tpm2b_public_to_openssl_pkey(parent, &parent_pkey);
if (r < 0)
- return log_debug_errno(r, "Could not convert TPM2B_PUBLIC to Openssl PKEY: %m");
+ return log_debug_errno(r, "Could not convert TPM2B_PUBLIC to OpenSSL PKEY: %m");
r = tpm2_hash_alg_to_size(parent->publicArea.nameAlg);
if (r < 0)
_cleanup_(EVP_PKEY_freep) EVP_PKEY *parent_pkey = NULL;
r = tpm2_tpm2b_public_to_openssl_pkey(parent, &parent_pkey);
if (r < 0)
- return log_debug_errno(r, "Could not convert TPM2B_PUBLIC to Openssl PKEY: %m");
+ return log_debug_errno(r, "Could not convert TPM2B_PUBLIC to OpenSSL PKEY: %m");
int curve_id;
r = ecc_pkey_to_curve_x_y(
assert_se(kdf_kb_hmac_derive("COUNTER", "SHA256", key, key_len, salt, strlen(salt), info, info_len, /* seed= */ NULL, /* seed_size= */ 0, 64, &derived_key) >= 0);
assert_se(memcmp_nn(derived_key, 64, expected_derived_key, expected_derived_key_len) == 0);
#else
- log_tests_skipped("KDF-KB requires Openssl >= 3");
+ log_tests_skipped("KDF-KB requires OpenSSL >= 3");
#endif
}
"ed25a0043d6c1eb28296da1f9ab138dafee18f4c937bfc43601d4ee6e7634199",
"30EB1A1E9DEA7DE4DDB8F3FDF50A01E30581D606C1228D98AFF691DF743AC2EE9D99EFD2AE1946C079AA18C9524877FA65D5065F0DAED058AB3416AF80EB2B73");
#else
- log_tests_skipped("KDF-SS requires Openssl >= 3");
+ log_tests_skipped("KDF-SS requires OpenSSL >= 3");
#endif
}