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

Issue 7253038: Fixes for OpenSSL (Closed)

Created:
9 years, 5 months ago by bulach
Modified:
9 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Fixes for OpenSSL A couple of nit fixes following: + http://codereview.chromium.org/7247005 + http://codereview.chromium.org/6990036 + Fixes a typo (ctx / context) + Adds new abstract methods from stream_socket.h BUG= TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=91498

Patch Set 1 #

Total comments: 4

Patch Set 2 : Comments #

Total comments: 4

Patch Set 3 : Adds new param to net/base/cert_database_openssl.cc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -3 lines) Patch
M crypto/openpgp_symmetric_encryption_openssl.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/base/cert_database_openssl.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M net/socket/ssl_client_socket_openssl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.cc View 1 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
bulach
Hi agl, gagan, I bundled a couple of unrelated fixes in this patch, would you ...
9 years, 5 months ago (2011-06-28 10:31:27 UTC) #1
agl
LGTM
9 years, 5 months ago (2011-06-28 11:17:46 UTC) #2
agl
LGTM
9 years, 5 months ago (2011-06-28 11:19:19 UTC) #3
gagansingh
http://codereview.chromium.org/7253038/diff/1/net/socket/ssl_client_socket_openssl.cc File net/socket/ssl_client_socket_openssl.cc (right): http://codereview.chromium.org/7253038/diff/1/net/socket/ssl_client_socket_openssl.cc#newcode1102 net/socket/ssl_client_socket_openssl.cc:1102: return 0; maybe return -1 as 0 might mean ...
9 years, 5 months ago (2011-06-28 11:32:03 UTC) #4
bulach
thanks both! Gagan, addressed your comments. another look, please? http://codereview.chromium.org/7253038/diff/1/net/socket/ssl_client_socket_openssl.cc File net/socket/ssl_client_socket_openssl.cc (right): http://codereview.chromium.org/7253038/diff/1/net/socket/ssl_client_socket_openssl.cc#newcode1102 net/socket/ssl_client_socket_openssl.cc:1102: ...
9 years, 5 months ago (2011-06-28 13:49:52 UTC) #5
gagansingh
LGTM
9 years, 5 months ago (2011-06-28 13:59:29 UTC) #6
commit-bot: I haz the power
Presubmit check for 7253038-2003 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 5 months ago (2011-06-29 09:15:13 UTC) #7
bulach
Hi Mike, I need your OWNERS power for this :) would you mind taking a ...
9 years, 5 months ago (2011-06-29 09:25:24 UTC) #8
bulach
+wtc for owners approval, please.
9 years, 5 months ago (2011-07-01 09:38:41 UTC) #9
wtc
LGTM. http://codereview.chromium.org/7253038/diff/2003/crypto/openpgp_symmetric_encryption_openssl.cc File crypto/openpgp_symmetric_encryption_openssl.cc (right): http://codereview.chromium.org/7253038/diff/2003/crypto/openpgp_symmetric_encryption_openssl.cc#newcode141 crypto/openpgp_symmetric_encryption_openssl.cc:141: EVP_MD_CTX_cleanup(&ctx); I think this file has been removed. ...
9 years, 5 months ago (2011-07-01 16:41:17 UTC) #10
bulach
thanks wtc! explanations inline, I'll land to get the bot green but happy to follow ...
9 years, 5 months ago (2011-07-05 10:06:54 UTC) #11
commit-bot: I haz the power
Change committed as 91498
9 years, 5 months ago (2011-07-05 11:34:48 UTC) #12
joth
9 years, 5 months ago (2011-07-05 11:42:24 UTC) #13
On 2011/07/05 10:06:54, bulach wrote:
> joth pointed out that it'd be cleaner to have:
> 
> CHECK(transport_.get() && transport_->socked());
> return transport_->socket()->FooBar();
> 
> or even better, have some adapter / base class that we could re-use across all
> platform rather than duplicate this code..
> if you agree with either suggestions, I'm happy to follow up!
> 

Just to clarify these points
1/ using CHECK for pre-conditions is far more in line with the style guide than
coding up NOTREACHED impossible return paths.

2/ As a rough estimate, we have 10 unique socket types that just delegate many
of the API methods to an underlying transport socket. (see grep below). It seems
there should be someway to factor out a delegate socket base class that means
these methods can just be implemented once each time a new one is added.
(Or maybe, extract a seperate interface for the connection status query methods,
and then there's just one GetStreamStatusProvider() virtual that needs to
delegate to the underlying transport)

$ git gs ">GetConnectTimeMicros" 
jingle/notifier/base/fake_ssl_client_socket.cc:344:  return
transport_socket_->GetConnectTimeMicros();
jingle/notifier/base/proxy_resolving_client_socket.cc:354:    return
transport_->socket()->GetConnectTimeMicros();
net/http/http_basic_stream.cc:138:  double rtt =
connection_->socket()->GetConnectTimeMicros().ToInternalValue();
net/http/http_proxy_client_socket.cc:178:    return
transport_->socket()->GetConnectTimeMicros();
net/socket/socks5_client_socket.cc:155:    return
transport_->socket()->GetConnectTimeMicros();
net/socket/socks_client_socket.cc:182:    return
transport_->socket()->GetConnectTimeMicros();
net/socket/ssl_client_socket_mac.cc:671:    return
transport_->socket()->GetConnectTimeMicros();
net/socket/ssl_client_socket_nss.cc:740:    return
transport_->socket()->GetConnectTimeMicros();
net/socket/ssl_client_socket_win.cc:744:    return
transport_->socket()->GetConnectTimeMicros();
net/socket/ssl_server_socket_nss.cc:234:  return
transport_socket_->GetConnectTimeMicros();

Powered by Google App Engine
This is Rietveld 408576698