Skip to content
Permalink
Browse files
[GCrypt] Only report libgcrypt errors when logging is enabled
https://bugs.webkit.org/show_bug.cgi?id=177360

Reviewed by Xabier Rodriguez-Calvar.

* pal/crypto/gcrypt/Utilities.h:
(PAL::GCrypt::logError): Only print out the libgcrypt error on stderr
when logging is enabled at build-time, avoiding unnecessary output in
non-debugging use cases.


Canonical link: https://commits.webkit.org/193791@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
zdobersek committed Sep 26, 2017
1 parent 6f319d5 commit 5295cd2e24d1e3397d5a02fbb249ce98124af85c
Showing 2 changed files with 17 additions and 0 deletions.
@@ -1,3 +1,15 @@
2017-09-26 Zan Dobersek <zdobersek@igalia.com>

[GCrypt] Only report libgcrypt errors when logging is enabled
https://bugs.webkit.org/show_bug.cgi?id=177360

Reviewed by Xabier Rodriguez-Calvar.

* pal/crypto/gcrypt/Utilities.h:
(PAL::GCrypt::logError): Only print out the libgcrypt error on stderr
when logging is enabled at build-time, avoiding unnecessary output in
non-debugging use cases.

2017-09-25 Timothy Horton <timothy_horton@apple.com>

Make progress on getting Mac CMake building again
@@ -43,8 +43,13 @@ using CipherOperation = gcry_error_t(gcry_cipher_hd_t, void*, size_t, const void

static inline void logError(gcry_error_t error)
{
// FIXME: Use a WebCrypto WTF log channel here once those are moved down to PAL.
#if !LOG_DISABLED
WTFLogAlways("libgcrypt error: source '%s', description '%s'",
gcry_strsource(error), gcry_strerror(error));
#else
UNUSED_PARAM(error);
#endif
}

static inline std::optional<int> aesAlgorithmForKeySize(size_t keySize)

0 comments on commit 5295cd2

Please sign in to comment.