summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc')
-rw-r--r--chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc21
1 files changed, 7 insertions, 14 deletions
diff --git a/chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc b/chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc
index 19ef480..31a274f 100644
--- a/chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc
+++ b/chrome/browser/chromeos/attestation/attestation_policy_observer_unittest.cc
@@ -19,7 +19,7 @@
#include "content/public/test/test_browser_thread.h"
#include "crypto/rsa_private_key.h"
#include "net/cert/x509_certificate.h"
-#include "net/cert/x509_util_nss.h"
+#include "net/cert/x509_util.h"
#include "testing/gtest/include/gtest/gtest.h"
using testing::_;
@@ -220,19 +220,12 @@ class AttestationPolicyObserverTest : public ::testing::Test {
&kTestKeyData[arraysize(kTestKeyData)])));
if (!test_key.get())
return false;
- net::X509Certificate::OSCertHandle handle =
- net::x509_util::CreateSelfSignedCert(test_key->public_key(),
- test_key->key(),
- "CN=subject",
- 12345,
- valid_start,
- valid_expiry);
-
- if (!handle)
- return false;
- bool result = net::X509Certificate::GetDEREncoded(handle, certificate);
- net::X509Certificate::FreeOSCertHandle(handle);
- return result;
+ return net::x509_util::CreateSelfSignedCert(test_key.get(),
+ "CN=subject",
+ 12345,
+ valid_start,
+ valid_expiry,
+ certificate);
}
base::MessageLoop message_loop_;