diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 15:11:33 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-19 15:11:33 +0000 |
commit | 7c3090a02e256e1fc42d37123195caa134cb487b (patch) | |
tree | 73f7463b09c7e980206a3a8f1f0a963f97e4d529 /crypto/ec_signature_creator_impl.h | |
parent | 7cd51e7bf5a86cd362c35119a138bc4969579c74 (diff) | |
download | chromium_src-7c3090a02e256e1fc42d37123195caa134cb487b.zip chromium_src-7c3090a02e256e1fc42d37123195caa134cb487b.tar.gz chromium_src-7c3090a02e256e1fc42d37123195caa134cb487b.tar.bz2 |
crypto: add DecodeSignature and use SHA-256 with ECDSA.
This changes ECSignatureCreator to use the hash function that SPDY
expects (SHA-256). There are no other users of ECSignatureCreator in
the tree so I'm going to defer making these choices parameters until there's
a benefit to be had.
It also adds DecodeSignature to convert from ASN.1 signatures to the `raw'
form that SPDY needs.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/10910226
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto/ec_signature_creator_impl.h')
-rw-r--r-- | crypto/ec_signature_creator_impl.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/ec_signature_creator_impl.h b/crypto/ec_signature_creator_impl.h index f8baf86..8ef67cd 100644 --- a/crypto/ec_signature_creator_impl.h +++ b/crypto/ec_signature_creator_impl.h @@ -19,8 +19,12 @@ class ECSignatureCreatorImpl : public ECSignatureCreator { int data_len, std::vector<uint8>* signature) OVERRIDE; + virtual bool DecodeSignature(const std::vector<uint8>& der_sig, + std::vector<uint8>* out_raw_sig) OVERRIDE; + private: ECPrivateKey* key_; + size_t signature_len_; DISALLOW_COPY_AND_ASSIGN(ECSignatureCreatorImpl); }; |