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

Issue 4777001: Implements encryptor_openssl.cc (Closed)

Created:
10 years, 1 month ago by joth
Modified:
9 years, 7 months ago
Reviewers:
agl, bulach, wtc, Ryan Sleevi
CC:
chromium-reviews, brettw-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Implements encryptor_openssl.cc Depends on pending CL http://codereview.chromium.org/4691003/ BUG=None TEST=base_unittests Encryptor* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=65952

Patch Set 1 #

Patch Set 2 : fix whitespace #

Patch Set 3 : more ws #

Patch Set 4 : moar witesps #

Total comments: 20

Patch Set 5 : lint #

Total comments: 9

Patch Set 6 : rsleevi and agl comments #

Patch Set 7 : Tidy up, and fix windows & NSS #

Patch Set 8 : fix linux & win #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -22 lines) Patch
M base/crypto/encryptor.h View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
M base/crypto/encryptor_nss.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M base/crypto/encryptor_openssl.cc View 1 2 3 4 5 6 2 chunks +97 lines, -6 lines 0 comments Download
M base/crypto/encryptor_unittest.cc View 5 6 2 chunks +122 lines, -0 lines 0 comments Download
M base/crypto/encryptor_win.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M base/crypto/symmetric_key.h View 1 2 3 4 5 6 1 chunk +3 lines, -1 line 0 comments Download
M base/openssl_util.h View 1 chunk +0 lines, -11 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
joth
Thanks in advance for the reviews....!
10 years, 1 month ago (2010-11-10 21:52:43 UTC) #1
wtc
Please consider this a drive-by review because I'm not familiar with OpenSSL, even though I ...
10 years, 1 month ago (2010-11-10 23:40:32 UTC) #2
Ryan Sleevi
A few comments below with regards to the error handling http://codereview.chromium.org/4777001/diff/6001/base/crypto/encryptor.h File base/crypto/encryptor.h (right): http://codereview.chromium.org/4777001/diff/6001/base/crypto/encryptor.h#newcode50 ...
10 years, 1 month ago (2010-11-10 23:46:58 UTC) #3
joth
Thanks both. I'm not entirely clear on what key sizes the portable API is required ...
10 years, 1 month ago (2010-11-11 17:35:58 UTC) #4
Ryan Sleevi
LGTM. Two nits below, but nothing requiring re-review. Feel free to ignore the AES-192 if ...
10 years, 1 month ago (2010-11-11 17:59:30 UTC) #5
agl
LGTM http://codereview.chromium.org/4777001/diff/13001/base/crypto/encryptor_openssl.cc File base/crypto/encryptor_openssl.cc (right): http://codereview.chromium.org/4777001/diff/13001/base/crypto/encryptor_openssl.cc#newcode80 base/crypto/encryptor_openssl.cc:80: if (input.size() == 0) Why is this a ...
10 years, 1 month ago (2010-11-11 18:05:36 UTC) #6
joth
Thanks both http://codereview.chromium.org/4777001/diff/13001/base/crypto/encryptor_openssl.cc File base/crypto/encryptor_openssl.cc (right): http://codereview.chromium.org/4777001/diff/13001/base/crypto/encryptor_openssl.cc#newcode25 base/crypto/encryptor_openssl.cc:25: return NULL; On 2010/11/11 17:59:30, rsleevi wrote: ...
10 years, 1 month ago (2010-11-11 20:32:01 UTC) #7
agl
10 years, 1 month ago (2010-11-11 20:39:44 UTC) #8
http://codereview.chromium.org/4777001/diff/13001/base/crypto/encryptor_opens...
File base/crypto/encryptor_openssl.cc (right):

http://codereview.chromium.org/4777001/diff/13001/base/crypto/encryptor_opens...
base/crypto/encryptor_openssl.cc:80: if (input.size() == 0)
On 2010/11/11 20:32:01, joth wrote:
> Works fine for encrypt, but fails for decrypt: the openssl functions fail
> gracefully for us, but the return code is 'false'. Seem OK?

Well a zero length input to decrypt *is* invalid. It sounds like OpenSSL is
doing the right thing and we can just report its errors back.

Powered by Google App Engine
This is Rietveld 408576698