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

Unified Diff: net/base/x509_util_nss_unittest.cc

Issue 9617039: Change Origin bound certs -> Domain bound certs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/x509_util_nss.cc ('k') | net/base/x509_util_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_util_nss_unittest.cc
diff --git a/net/base/x509_util_nss_unittest.cc b/net/base/x509_util_nss_unittest.cc
index 97eb5b4163e9ee06a5987d447fb36e12c00769f6..be719d79483807e748fb0ffd779015448ad68a59 100644
--- a/net/base/x509_util_nss_unittest.cc
+++ b/net/base/x509_util_nss_unittest.cc
@@ -74,7 +74,7 @@ void VerifyCertificateSignature(const std::string& der_cert,
EXPECT_TRUE(ok);
}
-void VerifyOriginBoundCert(const std::string& origin,
+void VerifyDomainBoundCert(const std::string& domain,
const std::string& der_cert) {
// Origin Bound Cert OID.
static const char oid_string[] = "1.3.6.1.4.1.11129.2.1.6";
@@ -82,8 +82,8 @@ void VerifyOriginBoundCert(const std::string& origin,
// Create object neccessary for extension lookup call.
SECItem extension_object = {
siAsciiString,
- (unsigned char*)origin.data(),
- origin.size()
+ (unsigned char*)domain.data(),
+ domain.size()
};
// IA5Encode and arena allocate SECItem.
@@ -139,24 +139,24 @@ void VerifyOriginBoundCert(const std::string& origin,
} // namespace
-// This test creates an origin-bound cert from an EC private key and
+// This test creates a domain-bound cert from an EC private key and
// then verifies the content of the certificate.
-TEST(X509UtilNSSTest, CreateOriginBoundCertEC) {
+TEST(X509UtilNSSTest, CreateDomainBoundCertEC) {
// Create a sample ASCII weborigin.
- std::string origin = "http://weborigin.com:443";
+ std::string domain = "weborigin.com";
base::Time now = base::Time::Now();
scoped_ptr<crypto::ECPrivateKey> private_key(
crypto::ECPrivateKey::Create());
std::string der_cert;
- ASSERT_TRUE(x509_util::CreateOriginBoundCertEC(
+ ASSERT_TRUE(x509_util::CreateDomainBoundCertEC(
private_key.get(),
- origin, 1,
+ domain, 1,
now,
now + base::TimeDelta::FromDays(1),
&der_cert));
- VerifyOriginBoundCert(origin, der_cert);
+ VerifyDomainBoundCert(domain, der_cert);
#if !defined(OS_WIN) && !defined(OS_MACOSX)
// signature_verifier_win and signature_verifier_mac can't handle EC certs.
« no previous file with comments | « net/base/x509_util_nss.cc ('k') | net/base/x509_util_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698