OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
| 5 #include <stddef.h> |
| 6 |
5 #include "base/numerics/safe_math.h" | 7 #include "base/numerics/safe_math.h" |
6 #include "components/webcrypto/algorithms/rsa_sign.h" | 8 #include "components/webcrypto/algorithms/rsa_sign.h" |
7 #include "components/webcrypto/algorithms/util.h" | 9 #include "components/webcrypto/algorithms/util.h" |
8 #include "components/webcrypto/blink_key_handle.h" | 10 #include "components/webcrypto/blink_key_handle.h" |
9 #include "components/webcrypto/crypto_data.h" | 11 #include "components/webcrypto/crypto_data.h" |
10 #include "components/webcrypto/status.h" | 12 #include "components/webcrypto/status.h" |
11 #include "crypto/openssl_util.h" | 13 #include "crypto/openssl_util.h" |
12 #include "crypto/scoped_openssl_types.h" | 14 #include "crypto/scoped_openssl_types.h" |
13 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" | 15 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" |
14 | 16 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 138 |
137 if (!EVP_DigestVerifyUpdate(ctx.get(), data.bytes(), data.byte_length())) | 139 if (!EVP_DigestVerifyUpdate(ctx.get(), data.bytes(), data.byte_length())) |
138 return Status::OperationError(); | 140 return Status::OperationError(); |
139 | 141 |
140 *signature_match = 1 == EVP_DigestVerifyFinal(ctx.get(), signature.bytes(), | 142 *signature_match = 1 == EVP_DigestVerifyFinal(ctx.get(), signature.bytes(), |
141 signature.byte_length()); | 143 signature.byte_length()); |
142 return Status::Success(); | 144 return Status::Success(); |
143 } | 145 } |
144 | 146 |
145 } // namespace webcrypto | 147 } // namespace webcrypto |
OLD | NEW |