OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "crypto/openssl_util.h" | 5 #include "crypto/openssl_util.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <string> |
| 11 |
10 #include "base/logging.h" | 12 #include "base/logging.h" |
11 #include "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
12 #include "third_party/boringssl/src/include/openssl/crypto.h" | 14 #include "third_party/boringssl/src/include/openssl/crypto.h" |
13 #include "third_party/boringssl/src/include/openssl/err.h" | 15 #include "third_party/boringssl/src/include/openssl/err.h" |
14 | 16 |
15 namespace crypto { | 17 namespace crypto { |
16 | 18 |
17 namespace { | 19 namespace { |
18 | 20 |
19 // Callback routine for OpenSSL to print error messages. |str| is a | 21 // Callback routine for OpenSSL to print error messages. |str| is a |
(...skipping 26 matching lines...) Expand all Loading... |
46 std::string message; | 48 std::string message; |
47 location.Write(true, true, &message); | 49 location.Write(true, true, &message); |
48 DVLOG(1) << "OpenSSL ERR_get_error stack from " << message; | 50 DVLOG(1) << "OpenSSL ERR_get_error stack from " << message; |
49 ERR_print_errors_cb(&OpenSSLErrorCallback, NULL); | 51 ERR_print_errors_cb(&OpenSSLErrorCallback, NULL); |
50 } else { | 52 } else { |
51 ERR_clear_error(); | 53 ERR_clear_error(); |
52 } | 54 } |
53 } | 55 } |
54 | 56 |
55 } // namespace crypto | 57 } // namespace crypto |
OLD | NEW |