Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(146)

Unified Diff: net/cert/ct_signed_certificate_timestamp_log_param.cc

Issue 1772603002: Addition of Certificate Transparency details to Security panel of DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/ct_sct_to_string.cc ('k') | net/cert/multi_log_ct_verifier_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/ct_signed_certificate_timestamp_log_param.cc
diff --git a/net/cert/ct_signed_certificate_timestamp_log_param.cc b/net/cert/ct_signed_certificate_timestamp_log_param.cc
index 6d5b864a3b28923344f2480abae7f22b0f42c4f3..f829e56a8139ae1a24a40d5ce3f950af83f1b332 100644
--- a/net/cert/ct_signed_certificate_timestamp_log_param.cc
+++ b/net/cert/ct_signed_certificate_timestamp_log_param.cc
@@ -13,6 +13,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
+#include "net/cert/ct_sct_to_string.h"
#include "net/cert/ct_verify_result.h"
#include "net/cert/signed_certificate_timestamp.h"
@@ -20,62 +21,6 @@ namespace net {
namespace {
-// Converts a numeric |origin| to text describing the SCT's origin
-const char* OriginToString(ct::SignedCertificateTimestamp::Origin origin) {
- switch (origin) {
- case ct::SignedCertificateTimestamp::SCT_EMBEDDED:
- return "embedded_in_certificate";
- case ct::SignedCertificateTimestamp::SCT_FROM_TLS_EXTENSION:
- return "tls_extension";
- case ct::SignedCertificateTimestamp::SCT_FROM_OCSP_RESPONSE:
- return "ocsp";
- case ct::SignedCertificateTimestamp::SCT_ORIGIN_MAX:
- break;
- }
-
- return "unknown";
-}
-
-// Converts a numeric |hash_algorithm| to its textual representation
-const char* HashAlgorithmToString(
- ct::DigitallySigned::HashAlgorithm hash_algorithm) {
- switch (hash_algorithm) {
- case ct::DigitallySigned::HASH_ALGO_NONE:
- return "NONE";
- case ct::DigitallySigned::HASH_ALGO_MD5:
- return "MD5";
- case ct::DigitallySigned::HASH_ALGO_SHA1:
- return "SHA1";
- case ct::DigitallySigned::HASH_ALGO_SHA224:
- return "SHA224";
- case ct::DigitallySigned::HASH_ALGO_SHA256:
- return "SHA256";
- case ct::DigitallySigned::HASH_ALGO_SHA384:
- return "SHA384";
- case ct::DigitallySigned::HASH_ALGO_SHA512:
- return "SHA512";
- }
-
- return "unknown";
-}
-
-// Converts a numeric |signature_algorithm| to its textual representation
-const char* SignatureAlgorithmToString(
- ct::DigitallySigned::SignatureAlgorithm signature_algorithm) {
- switch (signature_algorithm) {
- case ct::DigitallySigned::SIG_ALGO_ANONYMOUS:
- return "ANONYMOUS";
- case ct::DigitallySigned::SIG_ALGO_RSA:
- return "RSA";
- case ct::DigitallySigned::SIG_ALGO_DSA:
- return "DSA";
- case ct::DigitallySigned::SIG_ALGO_ECDSA:
- return "ECDSA";
- }
-
- return "unknown";
-}
-
// Base64 encode the given |value| string and put it in |dict| with the
// description |key|.
void SetBinaryData(
« no previous file with comments | « net/cert/ct_sct_to_string.cc ('k') | net/cert/multi_log_ct_verifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698