| Index: Source/modules/crypto/NormalizeAlgorithm.cpp
|
| diff --git a/Source/modules/crypto/NormalizeAlgorithm.cpp b/Source/modules/crypto/NormalizeAlgorithm.cpp
|
| index a7e1d28b9835d9292dd4106fad2181f8344a19a4..53c8c555bcf44e1180b8de4666248a2dadfab821 100644
|
| --- a/Source/modules/crypto/NormalizeAlgorithm.cpp
|
| +++ b/Source/modules/crypto/NormalizeAlgorithm.cpp
|
| @@ -607,6 +607,21 @@ bool parseRsaOaepParams(const Dictionary& raw, OwnPtr<WebCryptoAlgorithmParams>&
|
| return true;
|
| }
|
|
|
| +// Defined by the WebCrypto spec as:
|
| +//
|
| +// dictionary RsaPssParams : Algorithm {
|
| +// [EnforceRange] required unsigned long saltLength;
|
| +// };
|
| +bool parseRsaPssParams(const Dictionary& raw, OwnPtr<WebCryptoAlgorithmParams>& params, const ErrorContext& context, AlgorithmError* error)
|
| +{
|
| + uint32_t saltLengthBytes;
|
| + if (!getUint32(raw, "saltLength", saltLengthBytes, context, error))
|
| + return false;
|
| +
|
| + params = adoptPtr(new WebCryptoRsaPssParams(saltLengthBytes));
|
| + return true;
|
| +}
|
| +
|
| bool parseAlgorithmParams(const Dictionary& raw, WebCryptoAlgorithmParamsType type, OwnPtr<WebCryptoAlgorithmParams>& params, ErrorContext& context, AlgorithmError* error)
|
| {
|
| switch (type) {
|
| @@ -640,6 +655,10 @@ bool parseAlgorithmParams(const Dictionary& raw, WebCryptoAlgorithmParamsType ty
|
| context.add("RsaOaepParams");
|
| return parseRsaOaepParams(raw, params, context, error);
|
| break;
|
| + case WebCryptoAlgorithmParamsTypeRsaPssParams:
|
| + context.add("RsaPssParams");
|
| + return parseRsaPssParams(raw, params, context, error);
|
| + break;
|
| }
|
| ASSERT_NOT_REACHED();
|
| return false;
|
|
|