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

Issue 4963002: Refactor EnsureOpenSSLInit and openssl_util into base (Closed)

Created:
10 years, 1 month ago by joth
Modified:
9 years, 7 months ago
Reviewers:
bulach, wtc
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, Ryan Sleevi
Visibility:
Public.

Description

Refactor EnsureOpenSSLInit and openssl_util into base This allows the base/crypto methods to call EnsureOpenSSLInit. Also factors out the SSL_CTX and X509_STORE to be more closely associated with their consumers (ssl socket and X509Certificate resp.) rather than process wide globals. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=66413

Patch Set 1 #

Patch Set 2 : rebased #

Total comments: 12

Patch Set 3 : bulach comments #

Patch Set 4 : review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -178 lines) Patch
M base/crypto/encryptor_openssl.cc View 3 chunks +4 lines, -1 line 0 comments Download
M base/crypto/symmetric_key_openssl.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M base/openssl_util.h View 1 2 3 2 chunks +20 lines, -0 lines 0 comments Download
M base/openssl_util.cc View 1 chunk +57 lines, -0 lines 0 comments Download
M base/scoped_vector.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/base/cert_test_util.cc View 1 2 3 6 chunks +10 lines, -12 lines 0 comments Download
D net/base/openssl_util.h View 1 chunk +0 lines, -59 lines 0 comments Download
D net/base/openssl_util.cc View 1 chunk +0 lines, -86 lines 0 comments Download
M net/base/x509_certificate.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M net/base/x509_certificate_openssl.cc View 1 2 3 10 chunks +26 lines, -10 lines 0 comments Download
M net/net.gyp View 1 2 2 chunks +0 lines, -4 lines 0 comments Download
M net/socket/ssl_client_socket_openssl.cc View 1 2 3 5 chunks +28 lines, -6 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
joth
10 years, 1 month ago (2010-11-15 18:28:46 UTC) #1
bulach
LGTM nice cleanup! minor suggestions below: http://codereview.chromium.org/4963002/diff/2001/net/base/x509_certificate_openssl.cc File net/base/x509_certificate_openssl.cc (right): http://codereview.chromium.org/4963002/diff/2001/net/base/x509_certificate_openssl.cc#newcode335 net/base/x509_certificate_openssl.cc:335: base::EnsureOpenSSLInit(); you may ...
10 years, 1 month ago (2010-11-16 14:23:50 UTC) #2
wtc
Please consider my comments as drive-by review comments because I only reviewed the API (.h ...
10 years, 1 month ago (2010-11-16 15:35:07 UTC) #3
joth
Thanks. I also move the EnsureOpenSSLInit into the X509 init singleton, using a compound statement ...
10 years, 1 month ago (2010-11-16 15:57:41 UTC) #4
joth
Cheers! Let me know if you can suggest a better wording for the comment. http://codereview.chromium.org/4963002/diff/2001/base/openssl_util.h ...
10 years, 1 month ago (2010-11-16 16:07:19 UTC) #5
wtc
http://codereview.chromium.org/4963002/diff/2001/net/base/x509_certificate.h File net/base/x509_certificate.h (right): http://codereview.chromium.org/4963002/diff/2001/net/base/x509_certificate.h#newcode239 net/base/x509_certificate.h:239: // Returns a handle to a global, in-memory trusted ...
10 years, 1 month ago (2010-11-16 20:20:19 UTC) #6
joth
10 years, 1 month ago (2010-11-17 09:57:13 UTC) #7
Thanks, landing this now.

http://codereview.chromium.org/4963002/diff/2001/net/base/x509_certificate.h
File net/base/x509_certificate.h (right):

http://codereview.chromium.org/4963002/diff/2001/net/base/x509_certificate.h#...
net/base/x509_certificate.h:239: // Returns a handle to a global, in-memory
trusted root certificate store. We
On 2010/11/16 20:20:19, wtc wrote:
> On 2010/11/16 16:07:19, joth wrote:
> >
> > The latter, but only after the test code has used this method to access the
> > store and inject its certs (as per the "e.g.")
> > Is it incorrect to term this a "root" cert?
> 
> A test server's cert is not a "root" cert.  "Root" is short
> for "root CA", which is the highest CA in the certificate
> chain.  A test server's cert is the lowest cert in the
> certificate chain.
> 
> You should change
>     trusted root certificate store
> to simply
>     certificate store

Done.

Powered by Google App Engine
This is Rietveld 408576698