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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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_mac.cc ('k') | net/cert/x509_certificate_openssl.cc » ('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 <cert.h> 7 #include <cert.h>
8 #include <cryptohi.h> 8 #include <cryptohi.h>
9 #include <keyhi.h> 9 #include <keyhi.h>
10 #include <nss.h> 10 #include <nss.h>
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 cert_handle->derCert.len); 274 cert_handle->derCert.len);
275 } 275 }
276 276
277 // static 277 // static
278 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle, 278 void X509Certificate::GetPublicKeyInfo(OSCertHandle cert_handle,
279 size_t* size_bits, 279 size_t* size_bits,
280 PublicKeyType* type) { 280 PublicKeyType* type) {
281 x509_util::GetPublicKeyInfo(cert_handle, size_bits, type); 281 x509_util::GetPublicKeyInfo(cert_handle, size_bits, type);
282 } 282 }
283 283
284 // static
285 bool X509Certificate::IsSelfSigned(OSCertHandle cert_handle) {
286 crypto::ScopedSECKEYPublicKey public_key(CERT_ExtractPublicKey(cert_handle));
287 if (!public_key.get())
288 return false;
289 return SECSuccess == CERT_VerifySignedDataWithPublicKey(
290 &cert_handle->signatureWrap, public_key.get(), NULL);
291 }
292
284 } // namespace net 293 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_certificate_mac.cc ('k') | net/cert/x509_certificate_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698