summaryrefslogtreecommitdiffstats
path: root/net/socket/ssl_client_socket_nss.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-16 01:05:46 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-16 01:05:46 +0000
commitb30a3f5c4fc1e62eaffa8db57bc5681665df3643 (patch)
treeb5703b6ef2d6e879473861f0d85252f813144749 /net/socket/ssl_client_socket_nss.cc
parentfe62fc852bd3c1c162ee1f41992096f59387dc31 (diff)
downloadchromium_src-b30a3f5c4fc1e62eaffa8db57bc5681665df3643.zip
chromium_src-b30a3f5c4fc1e62eaffa8db57bc5681665df3643.tar.gz
chromium_src-b30a3f5c4fc1e62eaffa8db57bc5681665df3643.tar.bz2
Convert LOG(INFO) to VLOG(1) - net/.
Also converts COOKIE_DLOG (since VLOG can be toggled on a granular basis), removes some unneeded "endl"s and {}s, aligns "<<"s per style guide, and changes KeygenHandler::GenKeyAndSignChallenge() to avoid using "goto". BUG=none TEST=none Review URL: http://codereview.chromium.org/3846001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/ssl_client_socket_nss.cc')
-rw-r--r--net/socket/ssl_client_socket_nss.cc46
1 files changed, 24 insertions, 22 deletions
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index 9766654..39a2774 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -107,18 +107,20 @@ namespace net {
#define GotoState(s) next_handshake_state_ = s
#define LogData(s, len)
#else
-#define EnterFunction(x) LOG(INFO) << (void *)this << " " << __FUNCTION__ << \
- " enter " << x << \
- "; next_handshake_state " << next_handshake_state_
-#define LeaveFunction(x) LOG(INFO) << (void *)this << " " << __FUNCTION__ << \
- " leave " << x << \
- "; next_handshake_state " << next_handshake_state_
-#define GotoState(s) do { LOG(INFO) << (void *)this << " " << __FUNCTION__ << \
- " jump to state " << s; \
- next_handshake_state_ = s; } while (0)
-#define LogData(s, len) LOG(INFO) << (void *)this << " " << __FUNCTION__ << \
- " data [" << std::string(s, len) << "]";
-
+#define EnterFunction(x)\
+ VLOG(1) << (void *)this << " " << __FUNCTION__ << " enter " << x\
+ << "; next_handshake_state " << next_handshake_state_
+#define LeaveFunction(x)\
+ VLOG(1) << (void *)this << " " << __FUNCTION__ << " leave " << x\
+ << "; next_handshake_state " << next_handshake_state_
+#define GotoState(s)\
+ do {\
+ VLOG(1) << (void *)this << " " << __FUNCTION__ << " jump to state " << s;\
+ next_handshake_state_ = s;\
+ } while (0)
+#define LogData(s, len)\
+ VLOG(1) << (void *)this << " " << __FUNCTION__\
+ << " data [" << std::string(s, len) << "]"
#endif
namespace {
@@ -363,7 +365,7 @@ bool IsProblematicComodoEVCACert(const CERTCertificate& cert) {
// http://blogs.msdn.com/b/askie/archive/2009/06/09/my-expired-client-certificates-no-longer-display-when-connecting-to-my-web-server-using-ie8.aspx
BOOL WINAPI ClientCertFindCallback(PCCERT_CONTEXT cert_context,
void* find_arg) {
- LOG(INFO) << "Calling ClientCertFindCallback from _nss";
+ VLOG(1) << "Calling ClientCertFindCallback from _nss";
// Verify the certificate's KU is good.
BYTE key_usage;
if (CertGetIntendedKeyUsage(X509_ASN_ENCODING, cert_context->pCertInfo,
@@ -872,7 +874,7 @@ int SSLClientSocketNSS::InitializeSSLOptions() {
rv = SSL_OptionSet(nss_fd_, SSL_ENABLE_SNAP_START,
SSLConfigService::snap_start_enabled());
if (rv != SECSuccess)
- LOG(INFO) << "SSL_ENABLE_SNAP_START failed. Old system nss?";
+ VLOG(1) << "SSL_ENABLE_SNAP_START failed. Old system nss?";
#endif
#ifdef SSL_ENABLE_RENEGOTIATION
@@ -1245,8 +1247,8 @@ void SSLClientSocketNSS::CheckSecureRenegotiation() const {
if (SSL_HandshakeNegotiatedExtension(nss_fd_, ssl_renegotiation_info_xtn,
&received_renego_info) == SECSuccess &&
!received_renego_info) {
- LOG(INFO) << "The server " << hostname_
- << " does not support the TLS renegotiation_info extension.";
+ VLOG(1) << "The server " << hostname_
+ << " does not support the TLS renegotiation_info extension.";
}
#endif
}
@@ -2052,11 +2054,11 @@ int SSLClientSocketNSS::DoHandshake() {
net_error = ERR_NETNANNY_SSL_INTERCEPTION;
} else {
SaveSnapStartInfo();
- // SSL handshake is completed. It's possible that we mispredicted the NPN
- // agreed protocol. In this case, we've just sent a request in the wrong
- // protocol! The higher levels of this network stack aren't prepared for
- // switching the protocol like that so we make up an error and rely on
- // the fact that the request will be retried.
+ // SSL handshake is completed. It's possible that we mispredicted the
+ // NPN agreed protocol. In this case, we've just sent a request in the
+ // wrong protocol! The higher levels of this network stack aren't
+ // prepared for switching the protocol like that so we make up an error
+ // and rely on the fact that the request will be retried.
if (IsNPNProtocolMispredicted()) {
LOG(WARNING) << "Mispredicted NPN protocol for " << hostname_;
net_error = ERR_SSL_SNAP_START_NPN_MISPREDICTION;
@@ -2379,7 +2381,7 @@ int SSLClientSocketNSS::DoVerifyCertComplete(int result) {
// the cert in the allowed_bad_certs vector.
if (IsCertificateError(result) &&
ssl_config_.IsAllowedBadCert(server_cert_)) {
- LOG(INFO) << "accepting bad SSL certificate, as user told us to";
+ VLOG(1) << "accepting bad SSL certificate, as user told us to";
result = OK;
}