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

Unified Diff: extensions/browser/api/cast_channel/logger.cc

Issue 687733004: Implement crypto signature verification routines using OpenSSL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Misc. fixes Created 6 years, 2 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
Index: extensions/browser/api/cast_channel/logger.cc
diff --git a/extensions/browser/api/cast_channel/logger.cc b/extensions/browser/api/cast_channel/logger.cc
index bddf53971c24515792cbe689486390e8a7905159..7c2127a4cb7ea02124f44da3c098e6428e0a8942 100644
--- a/extensions/browser/api/cast_channel/logger.cc
+++ b/extensions/browser/api/cast_channel/logger.cc
@@ -46,14 +46,14 @@ proto::ChallengeReplyErrorType ChallegeReplyErrorToProto(
return proto::CHALLENGE_REPLY_ERROR_NO_RESPONSE;
case AuthResult::ERROR_FINGERPRINT_NOT_FOUND:
return proto::CHALLENGE_REPLY_ERROR_FINGERPRINT_NOT_FOUND;
- case AuthResult::ERROR_NSS_CERT_PARSING_FAILED:
- return proto::CHALLENGE_REPLY_ERROR_NSS_CERT_PARSING_FAILED;
- case AuthResult::ERROR_NSS_CERT_NOT_SIGNED_BY_TRUSTED_CA:
- return proto::CHALLENGE_REPLY_ERROR_NSS_CERT_NOT_SIGNED_BY_TRUSTED_CA;
- case AuthResult::ERROR_NSS_CANNOT_EXTRACT_PUBLIC_KEY:
- return proto::CHALLENGE_REPLY_ERROR_NSS_CANNOT_EXTRACT_PUBLIC_KEY;
- case AuthResult::ERROR_NSS_SIGNED_BLOBS_MISMATCH:
- return proto::CHALLENGE_REPLY_ERROR_NSS_SIGNED_BLOBS_MISMATCH;
+ case AuthResult::ERROR_CERT_PARSING_FAILED:
+ return proto::CHALLENGE_REPLY_ERROR_CERT_PARSING_FAILED;
+ case AuthResult::ERROR_CERT_NOT_SIGNED_BY_TRUSTED_CA:
+ return proto::CHALLENGE_REPLY_ERROR_CERT_NOT_SIGNED_BY_TRUSTED_CA;
+ case AuthResult::ERROR_CANNOT_EXTRACT_PUBLIC_KEY:
+ return proto::CHALLENGE_REPLY_ERROR_CANNOT_EXTRACT_PUBLIC_KEY;
+ case AuthResult::ERROR_SIGNED_BLOBS_MISMATCH:
+ return proto::CHALLENGE_REPLY_ERROR_SIGNED_BLOBS_MISMATCH;
default:
NOTREACHED();
return proto::CHALLENGE_REPLY_ERROR_NONE;
@@ -264,8 +264,16 @@ void Logger::LogSocketChallengeReplyEvent(int channel_id,
SocketEvent event = CreateEvent(proto::AUTH_CHALLENGE_REPLY);
event.set_challenge_reply_error_type(
ChallegeReplyErrorToProto(auth_result.error_type));
- if (auth_result.nss_error_code != 0)
+ if (auth_result.nss_error_code != 0) {
event.set_nss_error_code(auth_result.nss_error_code);
+ }
+ if (!auth_result.openssl_errors.empty()) {
+ for (const auto & next_error : auth_result.openssl_errors) {
+ proto::OpenSSLError* new_error = event.add_openssl_error();
+ new_error->set_filename(next_error.first);
+ new_error->set_line(next_error.second);
+ }
+ }
LogSocketEvent(channel_id, event);
}

Powered by Google App Engine
This is Rietveld 408576698