| Index: net/cert/internal/signature_algorithm.cc
|
| diff --git a/net/cert/internal/signature_algorithm.cc b/net/cert/internal/signature_algorithm.cc
|
| index 38158fce771bfdb37a7f9011611eb96bcc7997b6..23812546e366a954cd1f4d435f031d386e7671b2 100644
|
| --- a/net/cert/internal/signature_algorithm.cc
|
| +++ b/net/cert/internal/signature_algorithm.cc
|
| @@ -340,13 +340,13 @@ WARN_UNUSED_RESULT bool ParseHashAlgorithm(const der::Input input,
|
|
|
| DigestAlgorithm hash;
|
|
|
| - if (oid.Equals(der::Input(kOidSha1))) {
|
| + if (oid == der::Input(kOidSha1)) {
|
| hash = DigestAlgorithm::Sha1;
|
| - } else if (oid.Equals(der::Input(kOidSha256))) {
|
| + } else if (oid == der::Input(kOidSha256)) {
|
| hash = DigestAlgorithm::Sha256;
|
| - } else if (oid.Equals(der::Input(kOidSha384))) {
|
| + } else if (oid == der::Input(kOidSha384)) {
|
| hash = DigestAlgorithm::Sha384;
|
| - } else if (oid.Equals(der::Input(kOidSha512))) {
|
| + } else if (oid == der::Input(kOidSha512)) {
|
| hash = DigestAlgorithm::Sha512;
|
| } else {
|
| // Unsupported digest algorithm.
|
| @@ -395,7 +395,7 @@ WARN_UNUSED_RESULT bool ParseMaskGenAlgorithm(const der::Input input,
|
| return false;
|
|
|
| // MGF1 is the only supported mask generation algorithm.
|
| - if (!oid.Equals(der::Input(kOidMgf1)))
|
| + if (oid != der::Input(kOidMgf1))
|
| return false;
|
|
|
| return ParseHashAlgorithm(params, mgf1_hash);
|
| @@ -555,34 +555,34 @@ scoped_ptr<SignatureAlgorithm> SignatureAlgorithm::CreateFromDer(
|
| // TODO(eroman): Each OID is tested for equality in order, which is not
|
| // particularly efficient.
|
|
|
| - if (oid.Equals(der::Input(kOidSha1WithRsaEncryption)))
|
| + if (oid == der::Input(kOidSha1WithRsaEncryption))
|
| return ParseRsaPkcs1(DigestAlgorithm::Sha1, params);
|
|
|
| - if (oid.Equals(der::Input(kOidSha256WithRsaEncryption)))
|
| + if (oid == der::Input(kOidSha256WithRsaEncryption))
|
| return ParseRsaPkcs1(DigestAlgorithm::Sha256, params);
|
|
|
| - if (oid.Equals(der::Input(kOidSha384WithRsaEncryption)))
|
| + if (oid == der::Input(kOidSha384WithRsaEncryption))
|
| return ParseRsaPkcs1(DigestAlgorithm::Sha384, params);
|
|
|
| - if (oid.Equals(der::Input(kOidSha512WithRsaEncryption)))
|
| + if (oid == der::Input(kOidSha512WithRsaEncryption))
|
| return ParseRsaPkcs1(DigestAlgorithm::Sha512, params);
|
|
|
| - if (oid.Equals(der::Input(kOidEcdsaWithSha1)))
|
| + if (oid == der::Input(kOidEcdsaWithSha1))
|
| return ParseEcdsa(DigestAlgorithm::Sha1, params);
|
|
|
| - if (oid.Equals(der::Input(kOidEcdsaWithSha256)))
|
| + if (oid == der::Input(kOidEcdsaWithSha256))
|
| return ParseEcdsa(DigestAlgorithm::Sha256, params);
|
|
|
| - if (oid.Equals(der::Input(kOidEcdsaWithSha384)))
|
| + if (oid == der::Input(kOidEcdsaWithSha384))
|
| return ParseEcdsa(DigestAlgorithm::Sha384, params);
|
|
|
| - if (oid.Equals(der::Input(kOidEcdsaWithSha512)))
|
| + if (oid == der::Input(kOidEcdsaWithSha512))
|
| return ParseEcdsa(DigestAlgorithm::Sha512, params);
|
|
|
| - if (oid.Equals(der::Input(kOidRsaSsaPss)))
|
| + if (oid == der::Input(kOidRsaSsaPss))
|
| return ParseRsaPss(params);
|
|
|
| - if (oid.Equals(der::Input(kOidSha1WithRsaSignature)))
|
| + if (oid == der::Input(kOidSha1WithRsaSignature))
|
| return ParseRsaPkcs1(DigestAlgorithm::Sha1, params);
|
|
|
| return nullptr; // Unsupported OID.
|
|
|