Index: net/cert/internal/signature_algorithm.cc |
diff --git a/net/cert/internal/signature_algorithm.cc b/net/cert/internal/signature_algorithm.cc |
index 23812546e366a954cd1f4d435f031d386e7671b2..e9253b23b9a267297e30e7ed2b8b765fb6cf7a85 100644 |
--- a/net/cert/internal/signature_algorithm.cc |
+++ b/net/cert/internal/signature_algorithm.cc |
@@ -226,7 +226,8 @@ WARN_UNUSED_RESULT bool IsNull(const der::Input& input) { |
// Returns a nullptr on failure. |
// |
// RFC 5912 requires that the parameters for RSA PKCS#1 v1.5 algorithms be NULL |
-// ("PARAMS TYPE NULL ARE required"): |
+// ("PARAMS TYPE NULL ARE required"), however due to some non-compliance, we |
eroman
2016/02/12 21:09:44
Can this be re-phrased without using a pronoun? Se
svaldez
2016/02/12 22:00:11
Done.
|
+// also accept empty parameters: |
// |
// sa-rsaWithSHA1 SIGNATURE-ALGORITHM ::= { |
// IDENTIFIER sha1WithRSAEncryption |
@@ -261,7 +262,7 @@ WARN_UNUSED_RESULT bool IsNull(const der::Input& input) { |
// } |
scoped_ptr<SignatureAlgorithm> ParseRsaPkcs1(DigestAlgorithm digest, |
const der::Input& params) { |
- if (!IsNull(params)) |
+ if (!IsNull(params) && !IsEmpty(params)) |
return nullptr; |
return SignatureAlgorithm::CreateRsaPkcs1(digest); |