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

Unified Diff: crypto/signature_creator.h

Issue 1305183005: Add a CreatePSS method to SignatureCreator to permit the generation of PSS signatures. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | crypto/signature_creator_nss.cc » ('j') | crypto/signature_creator_nss.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/signature_creator.h
diff --git a/crypto/signature_creator.h b/crypto/signature_creator.h
index ab9d2c1a21b58cf9e7205668f517c03377c8456a..9fb47b64b6917a344277f41f7bfe4074cc45cf2c 100644
--- a/crypto/signature_creator.h
+++ b/crypto/signature_creator.h
@@ -40,6 +40,11 @@ class CRYPTO_EXPORT SignatureCreator {
// specified.
static SignatureCreator* Create(RSAPrivateKey* key, HashAlgorithm hash_alg);
+ // Create an instance. The caller must ensure that the provided PrivateKey
+ // instance outlives the created SignatureCreator. Uses the HashAlgorithm
+ // specified. The generated signature will be in the RSA-PSS format.
+ static SignatureCreator* CreatePSS(RSAPrivateKey* key,
+ HashAlgorithm hash_alg);
// Signs the precomputed |hash_alg| digest |data| using private |key| as
// specified in PKCS #1 v1.5.
Ryan Sleevi 2015/08/25 20:01:38 This of course would be inconsistent with your pro
@@ -56,6 +61,10 @@ class CRYPTO_EXPORT SignatureCreator {
bool Final(std::vector<uint8>* signature);
private:
+ static SignatureCreator* CreateImpl(RSAPrivateKey* key,
Ryan Sleevi 2015/08/25 20:01:38 This doesn't actually need to be static, does it?
+ HashAlgorithm hash_alg,
+ bool use_pss);
+
// Private constructor. Use the Create() method instead.
SignatureCreator();
« no previous file with comments | « no previous file | crypto/signature_creator_nss.cc » ('j') | crypto/signature_creator_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698