Update Simulcrypt ECMg
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
#include <string>
|
||||
|
||||
#include <cstdint>
|
||||
#include "absl/base/macros.h"
|
||||
#include "openssl/rsa.h"
|
||||
#include "common/hash_algorithm.h"
|
||||
|
||||
namespace widevine {
|
||||
|
||||
@@ -41,9 +43,20 @@ class RsaPrivateKey {
|
||||
|
||||
// Generate RSSASSA-PSS signature. Caller retains ownership of all parameters.
|
||||
// Returns true if successful, false otherwise.
|
||||
// TODO(b/155438325): remove this function after the below function is fully
|
||||
// propagated.
|
||||
ABSL_DEPRECATED(
|
||||
"Use the below function with |hash_algorithm| argument instead.")
|
||||
virtual bool GenerateSignature(const std::string& message,
|
||||
std::string* signature) const;
|
||||
|
||||
// Generate RSSASSA-PSS signature. Caller retains ownership of all parameters.
|
||||
// |hash_algorithm| indicates the hash algorithm used. Returns true if
|
||||
// successful, false otherwise.
|
||||
virtual bool GenerateSignature(const std::string& message,
|
||||
HashAlgorithm hash_algorithm,
|
||||
std::string* signature) const;
|
||||
|
||||
// Generate SHA256 digest, PKCS#7 padded signature. Caller retains ownership
|
||||
// of all parameters. Returns true if successful, false otherwise.
|
||||
virtual bool GenerateSignatureSha256Pkcs7(const std::string& message,
|
||||
@@ -98,9 +111,20 @@ class RsaPublicKey {
|
||||
|
||||
// Verify RSSASSA-PSS signature. Caller retains ownership of all parameters.
|
||||
// Returns true if validation succeeds, false otherwise.
|
||||
// TODO(b/155438325): remove this function after the below function is fully
|
||||
// propagated.
|
||||
ABSL_DEPRECATED(
|
||||
"Use the below function with |hash_algorithm| argument instead.")
|
||||
virtual bool VerifySignature(const std::string& message,
|
||||
const std::string& signature) const;
|
||||
|
||||
// Verify RSSASSA-PSS signature. Caller retains ownership of all parameters.
|
||||
// |hash_algorithm| indicates the hash algorithm used. Returns true if
|
||||
// validation succeeds, false otherwise.
|
||||
virtual bool VerifySignature(const std::string& message,
|
||||
HashAlgorithm hash_algorithm,
|
||||
const std::string& signature) const;
|
||||
|
||||
// Verify a signature. This method takes two parameters: |message| which is a
|
||||
// std::string containing the data which was signed, and |signature| which is a
|
||||
// std::string containing the message SHA256 digest signature with PKCS#7
|
||||
|
||||
Reference in New Issue
Block a user