aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAli Zhang <alizhang@google.com>2022-04-01 11:23:03 -0700
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-02 01:16:34 +0000
commit3f30a2e1ac848bd3dde1322ee2ace4d4f935c29d (patch)
tree48c083fe253ddad7fccbc8636fe89c7aed6e940c
parent5fac8d6b6c9eb2a45bff6c4be0e7e28b4f179fe1 (diff)
downloadpigweed-3f30a2e1ac848bd3dde1322ee2ace4d4f935c29d.tar.gz
pw_crypto: Move PW_LOG_MODULE_NAME to .cc
PW_LOG_MODULE_NAME is local and should be defined in .cc or "-D" overrides. Change-Id: I217990939301e3ffdb42a3f791ae1591a4c693f4 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/89482 Reviewed-by: Yecheng Zhao <zyecheng@google.com> Pigweed-Auto-Submit: Ali Zhang <alizhang@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
-rw-r--r--pw_crypto/ecdsa_boringssl.cc2
-rw-r--r--pw_crypto/ecdsa_mbedtls.cc2
-rw-r--r--pw_crypto/ecdsa_uecc.cc2
-rw-r--r--pw_crypto/public/pw_crypto/sha256.h3
-rw-r--r--pw_crypto/sha256_boringssl.cc2
-rw-r--r--pw_crypto/sha256_mbedtls.cc2
6 files changed, 7 insertions, 6 deletions
diff --git a/pw_crypto/ecdsa_boringssl.cc b/pw_crypto/ecdsa_boringssl.cc
index 4556950f9..4d361e3fa 100644
--- a/pw_crypto/ecdsa_boringssl.cc
+++ b/pw_crypto/ecdsa_boringssl.cc
@@ -11,7 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
-#define PW_LOG_MODULE_NAME "ECDSA"
+#define PW_LOG_MODULE_NAME "ECDSA-BSSL"
#define PW_LOG_LEVEL PW_LOG_LEVEL_WARN
#include "openssl/bn.h"
diff --git a/pw_crypto/ecdsa_mbedtls.cc b/pw_crypto/ecdsa_mbedtls.cc
index 92e6258ff..dd68eace9 100644
--- a/pw_crypto/ecdsa_mbedtls.cc
+++ b/pw_crypto/ecdsa_mbedtls.cc
@@ -11,7 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
-#define PW_LOG_MODULE_NAME "ECDSA"
+#define PW_LOG_MODULE_NAME "ECDSA-MTLS"
#define PW_LOG_LEVEL PW_LOG_LEVEL_WARN
#include "mbedtls/ecdsa.h"
diff --git a/pw_crypto/ecdsa_uecc.cc b/pw_crypto/ecdsa_uecc.cc
index 25e37b1b1..937d79d56 100644
--- a/pw_crypto/ecdsa_uecc.cc
+++ b/pw_crypto/ecdsa_uecc.cc
@@ -11,7 +11,7 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
-#define PW_LOG_MODULE_NAME "ECDSA"
+#define PW_LOG_MODULE_NAME "ECDSA-UECC"
#define PW_LOG_LEVEL PW_LOG_LEVEL_WARN
#include "pw_crypto/ecdsa.h"
diff --git a/pw_crypto/public/pw_crypto/sha256.h b/pw_crypto/public/pw_crypto/sha256.h
index cce159a9d..1389e28df 100644
--- a/pw_crypto/public/pw_crypto/sha256.h
+++ b/pw_crypto/public/pw_crypto/sha256.h
@@ -14,9 +14,6 @@
#pragma once
-#define PW_LOG_MODULE_NAME "SHA256"
-#define PW_LOG_LEVEL PW_LOG_LEVEL_WARN
-
#include <cstdint>
#include "pw_bytes/span.h"
diff --git a/pw_crypto/sha256_boringssl.cc b/pw_crypto/sha256_boringssl.cc
index ba558b1eb..fb9c783d1 100644
--- a/pw_crypto/sha256_boringssl.cc
+++ b/pw_crypto/sha256_boringssl.cc
@@ -11,6 +11,8 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
+#define PW_LOG_MODULE_NAME "SHA256-BSSL"
+#define PW_LOG_LEVEL PW_LOG_LEVEL_WARN
#include "pw_crypto/sha256.h"
#include "pw_status/status.h"
diff --git a/pw_crypto/sha256_mbedtls.cc b/pw_crypto/sha256_mbedtls.cc
index 0e9c48984..8cb6595ba 100644
--- a/pw_crypto/sha256_mbedtls.cc
+++ b/pw_crypto/sha256_mbedtls.cc
@@ -11,6 +11,8 @@
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
+#define PW_LOG_MODULE_NAME "SHA256-MTLS"
+#define PW_LOG_LEVEL PW_LOG_LEVEL_WARN
#include "pw_crypto/sha256.h"
#include "pw_status/status.h"