Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: net/cert/x509_certificate_openssl.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/cert/x509_certificate_known_roots_win.h ('k') | net/cert/x509_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_certificate.h" 5 #include "net/cert/x509_certificate.h"
6 6
7 #include <openssl/asn1.h> 7 #include <openssl/asn1.h>
8 #include <openssl/bytestring.h> 8 #include <openssl/bytestring.h>
9 #include <openssl/crypto.h> 9 #include <openssl/crypto.h>
10 #include <openssl/obj_mac.h> 10 #include <openssl/obj_mac.h>
11 #include <openssl/pem.h> 11 #include <openssl/pem.h>
12 #include <openssl/sha.h> 12 #include <openssl/sha.h>
13 #include <openssl/ssl.h> 13 #include <openssl/ssl.h>
14 #include <openssl/x509v3.h> 14 #include <openssl/x509v3.h>
15 15
16 #include "base/macros.h"
16 #include "base/memory/singleton.h" 17 #include "base/memory/singleton.h"
17 #include "base/numerics/safe_conversions.h" 18 #include "base/numerics/safe_conversions.h"
18 #include "base/pickle.h" 19 #include "base/pickle.h"
19 #include "base/sha1.h" 20 #include "base/sha1.h"
20 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
21 #include "base/strings/string_piece.h" 22 #include "base/strings/string_piece.h"
22 #include "base/strings/string_util.h" 23 #include "base/strings/string_util.h"
23 #include "crypto/openssl_util.h" 24 #include "crypto/openssl_util.h"
24 #include "crypto/scoped_openssl_types.h" 25 #include "crypto/scoped_openssl_types.h"
25 #include "net/base/ip_address_number.h" 26 #include "net/base/ip_address_number.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 bool X509Certificate::IsSelfSigned(OSCertHandle cert_handle) { 455 bool X509Certificate::IsSelfSigned(OSCertHandle cert_handle) {
455 crypto::ScopedEVP_PKEY scoped_key(X509_get_pubkey(cert_handle)); 456 crypto::ScopedEVP_PKEY scoped_key(X509_get_pubkey(cert_handle));
456 if (!scoped_key) 457 if (!scoped_key)
457 return false; 458 return false;
458 459
459 // NOTE: X509_verify() returns 1 in case of success, 0 or -1 on error. 460 // NOTE: X509_verify() returns 1 in case of success, 0 or -1 on error.
460 return X509_verify(cert_handle, scoped_key.get()) == 1; 461 return X509_verify(cert_handle, scoped_key.get()) == 1;
461 } 462 }
462 463
463 } // namespace net 464 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_certificate_known_roots_win.h ('k') | net/cert/x509_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698