diff options
author | Geoff Levand <geoff@infradead.org> | 2018-08-02 17:29:34 +0000 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2018-08-07 11:30:36 +1000 |
commit | c78f9ec47ba92b74698dacdae963dbbefd9b676f (patch) | |
tree | 58ce2f0f50f8edb451f81d9ecedc9abc842bc3d6 /lib/security/gpg.c | |
parent | 679d9dceb5bdf51f118548ca2645dc81088a8974 (diff) | |
download | talos-petitboot-c78f9ec47ba92b74698dacdae963dbbefd9b676f.tar.gz talos-petitboot-c78f9ec47ba92b74698dacdae963dbbefd9b676f.zip |
lib/log: Switch to pb_log_fn
The only functional change should be an additional '/n' to
a few log messagees that seemed to be missing it.
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'lib/security/gpg.c')
-rw-r--r-- | lib/security/gpg.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/security/gpg.c b/lib/security/gpg.c index aae85aa..e319a06 100644 --- a/lib/security/gpg.c +++ b/lib/security/gpg.c @@ -73,22 +73,22 @@ int decrypt_file(const char *filename, gpgme_set_locale(NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL)); err = gpgme_engine_check_version(GPGME_PROTOCOL_OpenPGP); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: OpenPGP support not available\n", __func__); + pb_log_fn("OpenPGP support not available\n"); return -1; } err = gpgme_get_engine_info(&enginfo); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: GPG engine failed to initialize\n", __func__); + pb_log_fn("GPG engine failed to initialize\n"); return -1; } err = gpgme_new(&gpg_context); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: GPG context could not be created\n", __func__); + pb_log_fn("GPG context could not be created\n"); return -1; } err = gpgme_set_protocol(gpg_context, GPGME_PROTOCOL_OpenPGP); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: GPG protocol could not be set\n", __func__); + pb_log_fn("GPG protocol could not be set\n"); return -1; } if (keyring_path) @@ -100,7 +100,7 @@ int decrypt_file(const char *filename, GPGME_PROTOCOL_OpenPGP, enginfo->file_name, enginfo->home_dir); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: Could not set GPG engine information\n", __func__); + pb_log_fn("Could not set GPG engine information\n"); return -1; } err = gpgme_data_new(&plaintext_data); @@ -120,7 +120,7 @@ int decrypt_file(const char *filename, err = gpgme_op_decrypt_verify(gpg_context, ciphertext_data, plaintext_data); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: Could not decrypt file\n", __func__); + pb_log_fn("Could not decrypt file\n"); return -1; } verification_result = gpgme_op_verify_result(gpg_context); @@ -210,7 +210,7 @@ int decrypt_file(const char *filename, gpgme_release(gpg_context); if (!valid) { - pb_log("%s: Incorrect GPG signature\n", __func__); + pb_log_fn("Incorrect GPG signature\n"); return -1; } @@ -242,22 +242,22 @@ int verify_file_signature(const char *plaintext_filename, gpgme_set_locale(NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL)); err = gpgme_engine_check_version(GPGME_PROTOCOL_OpenPGP); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: OpenPGP support not available\n", __func__); + pb_log_fn("OpenPGP support not available\n"); return -1; } err = gpgme_get_engine_info(&enginfo); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: GPG engine failed to initialize\n", __func__); + pb_log_fn("GPG engine failed to initialize\n"); return -1; } err = gpgme_new(&gpg_context); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: GPG context could not be created\n", __func__); + pb_log_fn("GPG context could not be created\n"); return -1; } err = gpgme_set_protocol(gpg_context, GPGME_PROTOCOL_OpenPGP); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: GPG protocol could not be set\n", __func__); + pb_log_fn("GPG protocol could not be set\n"); return -1; } if (keyring_path) @@ -269,7 +269,7 @@ int verify_file_signature(const char *plaintext_filename, GPGME_PROTOCOL_OpenPGP, enginfo->file_name, enginfo->home_dir); if (err != GPG_ERR_NO_ERROR) { - pb_log("%s: Could not set GPG engine information\n", __func__); + pb_log_fn("Could not set GPG engine information\n"); return -1; } err = gpgme_data_new_from_file(&plaintext_data, plaintext_filename, 1); @@ -340,7 +340,7 @@ int verify_file_signature(const char *plaintext_filename, gpgme_release(gpg_context); if (!valid) { - pb_log("%s: Incorrect GPG signature\n", __func__); + pb_log_fn("Incorrect GPG signature\n"); return -1; } |