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

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

Issue 13006020: net: extract net/cert out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/cert/x509_util_openssl.cc ('k') | net/cert/x509_util_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
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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "crypto/ec_private_key.h" 6 #include "crypto/ec_private_key.h"
7 #include "net/base/x509_util.h" 7 #include "net/cert/x509_util.h"
8 #include "net/base/x509_util_openssl.h" 8 #include "net/cert/x509_util_openssl.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 TEST(X509UtilOpenSSLTest, IsSupportedValidityRange) { 13 TEST(X509UtilOpenSSLTest, IsSupportedValidityRange) {
14 base::Time now = base::Time::Now(); 14 base::Time now = base::Time::Now();
15 EXPECT_TRUE(x509_util::IsSupportedValidityRange(now, now)); 15 EXPECT_TRUE(x509_util::IsSupportedValidityRange(now, now));
16 EXPECT_FALSE(x509_util::IsSupportedValidityRange( 16 EXPECT_FALSE(x509_util::IsSupportedValidityRange(
17 now, now - base::TimeDelta::FromSeconds(1))); 17 now, now - base::TimeDelta::FromSeconds(1)));
18 18
(...skipping 29 matching lines...) Expand all
48 private_key.get(), 48 private_key.get(),
49 domain, 1, 49 domain, 1,
50 now, 50 now,
51 now + base::TimeDelta::FromDays(1), 51 now + base::TimeDelta::FromDays(1),
52 &der_cert)); 52 &der_cert));
53 EXPECT_TRUE(der_cert.empty()); 53 EXPECT_TRUE(der_cert.empty());
54 54
55 } 55 }
56 56
57 } // namespace net 57 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/x509_util_openssl.cc ('k') | net/cert/x509_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698