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

Issue 118277: Introduce SignatureCreator. (Closed)

Created:
11 years, 6 months ago by Aaron Boodman
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Introduce SignatureCreator.

Patch Set 1 #

Patch Set 2 : Adjust comment #

Total comments: 8

Patch Set 3 : Merging in RSAKeyPair changes #

Patch Set 4 : Responses to feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+726 lines, -0 lines) Patch
M base/base.gyp View 3 chunks +8 lines, -0 lines 0 comments Download
A base/crypto/rsa_private_key.h View 1 chunk +66 lines, -0 lines 0 comments Download
A base/crypto/rsa_private_key_unittest.cc View 1 chunk +48 lines, -0 lines 0 comments Download
A base/crypto/rsa_private_key_win.cc View 1 chunk +445 lines, -0 lines 0 comments Download
A base/crypto/signature_creator.h View 1 2 3 1 chunk +53 lines, -0 lines 0 comments Download
A base/crypto/signature_creator_unittest.cc View 1 2 3 1 chunk +44 lines, -0 lines 0 comments Download
A base/crypto/signature_creator_win.cc View 3 1 chunk +62 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Aaron Boodman
Please ignore the unchanged file and the lack of vcproj update. This is the result ...
11 years, 6 months ago (2009-06-04 22:28:10 UTC) #1
Aaron Boodman
11 years, 6 months ago (2009-06-04 22:28:16 UTC) #2
Erik does not do reviews
LGTM http://codereview.chromium.org/118277/diff/1001/1004 File base/crypto/signature_creator.cc (right): http://codereview.chromium.org/118277/diff/1001/1004#newcode28 Line 28: if (!CryptDestroyHash(hash_object_)) { unneeded {} http://codereview.chromium.org/118277/diff/1001/1004#newcode47 Line ...
11 years, 6 months ago (2009-06-04 23:23:46 UTC) #3
wtc
11 years, 6 months ago (2009-06-04 23:29:34 UTC) #4
LGTM.  Good progress!

http://codereview.chromium.org/118277/diff/1001/1002
File base/crypto/rsa_key_pair.h (right):

http://codereview.chromium.org/118277/diff/1001/1002#newcode38
Line 38: HCRYPTPROV provider() { return provider_; }
Each class should be responsible for opening its own provider.
In the future we can add a class that returns a global
provider handle that everyone can use.

http://codereview.chromium.org/118277/diff/1001/1002#newcode39
Line 39: HCRYPTKEY key() { return key_; }
Probably should name this class RSAPrivateKey.

(An RSA private key contains enough info for you to derive
the corresponding public key, so it can also be considered
a key pair.)

http://codereview.chromium.org/118277/diff/1001/1005
File base/crypto/signature_creator.h (right):

http://codereview.chromium.org/118277/diff/1001/1005#newcode22
Line 22: // Signs data using a base cryptographic key pair (as opposed to a
certificate).
The hardcoded use of sha1WithRsaEncryption signature
algorithm should be documented here.

http://codereview.chromium.org/118277/diff/1001/1005#newcode26
Line 26: static SignatureCreator* Create(RSAKeyPair* key);
It's too bad the SignatureCreator interface isn't symmetric
to the SignatureVerifier interface.  They differ in:
1. How an instance is created
2. std::vector<uint8>

http://codereview.chromium.org/118277/diff/1001/1005#newcode44
Line 44: #endif
Should we add DISALLOW_COPY_AND_ASSIGN?

Powered by Google App Engine
This is Rietveld 408576698