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

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

Issue 8587018: Revert "Allow signing EC certs and creating EC origin-bound certs." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « net/base/x509_util_openssl.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/rsa_private_key.h" 6 #include "crypto/rsa_private_key.h"
7 #include "net/base/x509_util.h" 7 #include "net/base/x509_util.h"
8 #include "net/base/x509_util_openssl.h" 8 #include "net/base/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 // For OpenSSL, x509_util::CreateOriginBoundCert() is not yet implemented 13 // For OpenSSL, x509_util::CreateOriginBoundCert() is not yet implemented
14 // and should return false. This unit test ensures that a stub implementation 14 // and should return false. This unit test ensures that a stub implementation
15 // is present. 15 // is present.
16 TEST(X509UtilOpenSSLTest, CreateOriginBoundCertNotImplemented) { 16 TEST(X509UtilOpenSSLTest, CreateOriginBoundCertNotImplemented) {
17 std::string origin = "http://weborigin.com:443"; 17 std::string origin = "http://weborigin.com:443";
18 scoped_ptr<crypto::RSAPrivateKey> private_key( 18 scoped_ptr<crypto::RSAPrivateKey> private_key(
19 crypto::RSAPrivateKey::Create(1024)); 19 crypto::RSAPrivateKey::Create(1024));
20 std::string der_cert; 20 std::string der_cert;
21 EXPECT_FALSE(x509_util::CreateOriginBoundCertRSA(private_key.get(), 21 EXPECT_FALSE(x509_util::CreateOriginBoundCert(private_key.get(),
22 origin, 1, 22 origin, 1,
23 base::TimeDelta::FromDays(1), 23 base::TimeDelta::FromDays(1),
24 &der_cert)); 24 &der_cert));
25 EXPECT_TRUE(der_cert.empty()); 25 EXPECT_TRUE(der_cert.empty());
26 26
27 } 27 }
28 28
29 } // namespace net 29 } // namespace net
OLDNEW
« no previous file with comments | « net/base/x509_util_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698