From 71b9672b96ef49922bb5a80f8e2c384a9fa007a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= Date: Fri, 28 Dec 2018 01:38:45 -0500 Subject: [PATCH] value: don't print certificate id in toString by default --- src/value.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/value.cpp b/src/value.cpp index ed17f090..6f9f5306 100644 --- a/src/value.cpp +++ b/src/value.cpp @@ -54,12 +54,14 @@ std::ostream& operator<< (std::ostream& s, const Value& v) s << IpServiceAnnouncement(v.data); } else if (v.type == CERTIFICATE_TYPE.id) { s << "Certificate"; +#ifdef OPENDHT_LOG_CRT_ID try { - InfoHash h = crypto::Certificate(v.data).getPublicKey().getId(); + auto h = crypto::Certificate(v.data).getPublicKey().getLongId(); s << " with ID " << h; } catch (const std::exception& e) { s << " (invalid)"; } +#endif } else { s << "Data (type: " << v.type << " ): "; s << std::hex;