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

Side by Side Diff: net/der/encode_values.cc

Issue 2138413002: Revert of Add CheckOCSPDateValid() to net/cert/internal (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « net/der/encode_values.h ('k') | net/der/encode_values_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/time/time.h"
6 #include "net/der/encode_values.h"
7
8 namespace net {
9
10 namespace der {
11
12 bool EncodeTimeAsGeneralizedTime(const base::Time& time,
13 der::GeneralizedTime* generalized_time) {
14 base::Time::Exploded exploded;
15 time.UTCExplode(&exploded);
16 if (!exploded.HasValidValues())
17 return false;
18
19 generalized_time->year = exploded.year;
20 generalized_time->month = exploded.month;
21 generalized_time->day = exploded.day_of_month;
22 generalized_time->hours = exploded.hour;
23 generalized_time->minutes = exploded.minute;
24 generalized_time->seconds = exploded.second;
25 return true;
26 }
27
28 } // namespace der
29
30 } // namespace net
OLDNEW
« no previous file with comments | « net/der/encode_values.h ('k') | net/der/encode_values_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698