OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/gcm_driver/crypto/p256_key_util.h" | 5 #include "components/gcm_driver/crypto/p256_key_util.h" |
6 | 6 |
| 7 #include <stddef.h> |
7 #include <stdint.h> | 8 #include <stdint.h> |
8 | 9 |
9 #include <openssl/ec.h> | 10 #include <openssl/ec.h> |
10 #include <openssl/ecdh.h> | 11 #include <openssl/ecdh.h> |
11 #include <openssl/evp.h> | 12 #include <openssl/evp.h> |
12 | 13 |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
16 #include "crypto/ec_private_key.h" | 17 #include "crypto/ec_private_key.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 ec_private_key.get(), nullptr) != sizeof(result)) { | 71 ec_private_key.get(), nullptr) != sizeof(result)) { |
71 DLOG(ERROR) << "Unable to compute the ECDH shared secret."; | 72 DLOG(ERROR) << "Unable to compute the ECDH shared secret."; |
72 return false; | 73 return false; |
73 } | 74 } |
74 | 75 |
75 out_shared_secret->assign(reinterpret_cast<char*>(result), sizeof(result)); | 76 out_shared_secret->assign(reinterpret_cast<char*>(result), sizeof(result)); |
76 return true; | 77 return true; |
77 } | 78 } |
78 | 79 |
79 } // namespace gcm | 80 } // namespace gcm |
OLD | NEW |