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

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

Issue 1255073002: clang/win: Fix most -Wunused-function warnings in Chromium code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac Created 5 years, 4 months 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
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 "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/pickle.h" 9 #include "base/pickle.h"
10 #include "base/sha1.h" 10 #include "base/sha1.h"
(...skipping 17 matching lines...) Expand all
28 28
29 namespace net { 29 namespace net {
30 30
31 namespace { 31 namespace {
32 32
33 typedef crypto::ScopedCAPIHandle< 33 typedef crypto::ScopedCAPIHandle<
34 HCERTSTORE, 34 HCERTSTORE,
35 crypto::CAPIDestroyerWithFlags<HCERTSTORE, 35 crypto::CAPIDestroyerWithFlags<HCERTSTORE,
36 CertCloseStore, 0> > ScopedHCERTSTORE; 36 CertCloseStore, 0> > ScopedHCERTSTORE;
37 37
38 void ExplodedTimeToSystemTime(const base::Time::Exploded& exploded,
39 SYSTEMTIME* system_time) {
40 system_time->wYear = static_cast<WORD>(exploded.year);
41 system_time->wMonth = static_cast<WORD>(exploded.month);
42 system_time->wDayOfWeek = static_cast<WORD>(exploded.day_of_week);
43 system_time->wDay = static_cast<WORD>(exploded.day_of_month);
44 system_time->wHour = static_cast<WORD>(exploded.hour);
45 system_time->wMinute = static_cast<WORD>(exploded.minute);
46 system_time->wSecond = static_cast<WORD>(exploded.second);
47 system_time->wMilliseconds = static_cast<WORD>(exploded.millisecond);
48 }
49
50 //----------------------------------------------------------------------------- 38 //-----------------------------------------------------------------------------
51 39
52 // Decodes the cert's subjectAltName extension into a CERT_ALT_NAME_INFO 40 // Decodes the cert's subjectAltName extension into a CERT_ALT_NAME_INFO
53 // structure and stores it in *output. 41 // structure and stores it in *output.
54 void GetCertSubjectAltName( 42 void GetCertSubjectAltName(
55 PCCERT_CONTEXT cert, 43 PCCERT_CONTEXT cert,
56 scoped_ptr<CERT_ALT_NAME_INFO, base::FreeDeleter>* output) { 44 scoped_ptr<CERT_ALT_NAME_INFO, base::FreeDeleter>* output) {
57 PCERT_EXTENSION extension = CertFindExtension(szOID_SUBJECT_ALT_NAME2, 45 PCERT_EXTENSION extension = CertFindExtension(szOID_SUBJECT_ALT_NAME2,
58 cert->pCertInfo->cExtension, 46 cert->pCertInfo->cExtension,
59 cert->pCertInfo->rgExtension); 47 cert->pCertInfo->rgExtension);
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 X509_ASN_ENCODING, 480 X509_ASN_ENCODING,
493 CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT, 481 CRYPT_VERIFY_CERT_SIGN_SUBJECT_CERT,
494 reinterpret_cast<void*>(const_cast<PCERT_CONTEXT>(cert_handle)), 482 reinterpret_cast<void*>(const_cast<PCERT_CONTEXT>(cert_handle)),
495 CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT, 483 CRYPT_VERIFY_CERT_SIGN_ISSUER_CERT,
496 reinterpret_cast<void*>(const_cast<PCERT_CONTEXT>(cert_handle)), 484 reinterpret_cast<void*>(const_cast<PCERT_CONTEXT>(cert_handle)),
497 0, 485 0,
498 NULL); 486 NULL);
499 } 487 }
500 488
501 } // namespace net 489 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698