OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "net/cert/x509_util_openssl.h" | 5 #include "net/cert/x509_util_openssl.h" |
6 | 6 |
| 7 #include <limits.h> |
7 #include <openssl/asn1.h> | 8 #include <openssl/asn1.h> |
8 #include <openssl/mem.h> | 9 #include <openssl/mem.h> |
9 | 10 |
10 #include <algorithm> | 11 #include <algorithm> |
11 | 12 |
12 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/macros.h" | 15 #include "base/macros.h" |
15 #include "base/strings/string_piece.h" | 16 #include "base/strings/string_piece.h" |
16 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 internal_cache = new_cache.get(); | 300 internal_cache = new_cache.get(); |
300 X509_set_ex_data(x509, x509_der_cache_index, new_cache.release()); | 301 X509_set_ex_data(x509, x509_der_cache_index, new_cache.release()); |
301 } | 302 } |
302 *der_cache = base::StringPiece(internal_cache->data); | 303 *der_cache = base::StringPiece(internal_cache->data); |
303 return true; | 304 return true; |
304 } | 305 } |
305 | 306 |
306 } // namespace x509_util | 307 } // namespace x509_util |
307 | 308 |
308 } // namespace net | 309 } // namespace net |
OLD | NEW |