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

Unified Diff: net/base/keygen_handler_unittest.cc

Issue 5541002: Implements keygen handler for openssl, but without private key persistence (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: wtc comment Created 10 years 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
« net/base/keygen_handler_openssl.cc ('K') | « net/base/keygen_handler_openssl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/keygen_handler_unittest.cc
diff --git a/net/base/keygen_handler_unittest.cc b/net/base/keygen_handler_unittest.cc
index 408eb763a97c6794ba8814c1651329b2701c3a32..f4251f2b9b3d3a5d8b8e1642c6ade04efb9e17bf 100644
--- a/net/base/keygen_handler_unittest.cc
+++ b/net/base/keygen_handler_unittest.cc
@@ -4,14 +4,9 @@
#include "net/base/keygen_handler.h"
-#include "build/build_config.h" // Needs to be imported early for USE_NSS
-
-#if defined(USE_NSS)
-#include <private/pprthred.h> // PR_DetachThread
-#endif
-
#include <string>
+#include "build/build_config.h"
#include "base/base64.h"
#include "base/logging.h"
#include "base/nss_util.h"
@@ -21,6 +16,10 @@
#include "base/worker_pool.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(USE_NSS)
+#include <private/pprthred.h> // PR_DetachThread
+#endif
+
namespace net {
namespace {
@@ -73,13 +72,7 @@ void AssertValidSignedPublicKeyAndChallenge(const std::string& result,
// openssl asn1parse -inform DER
}
-// Keygen not yet implemented for OpenSSL: http://crbug.com/64917
-#if defined(USE_OPENSSL)
-#define MAYBE_SmokeTest FAILS_SmokeTest
-#else
-#define MAYBE_SmokeTest SmokeTest
-#endif
-TEST_F(KeygenHandlerTest, MAYBE_SmokeTest) {
+TEST_F(KeygenHandlerTest, SmokeTest) {
KeygenHandler handler(768, "some challenge", GURL("http://www.example.com"));
handler.set_stores_key(false); // Don't leave the key-pair behind
std::string result = handler.GenKeyAndSignChallenge();
@@ -102,7 +95,7 @@ class ConcurrencyTestTask : public Task {
base::ThreadRestrictions::ScopedAllowSingleton scoped_allow_singleton;
KeygenHandler handler(768, "some challenge",
GURL("http://www.example.com"));
- handler.set_stores_key(false); // Don't leave the key-pair behind.
+ handler.set_stores_key(false); // Don't leave the key-pair behind.
*result_ = handler.GenKeyAndSignChallenge();
event_->Signal();
#if defined(USE_NSS)
@@ -123,15 +116,9 @@ class ConcurrencyTestTask : public Task {
std::string* result_;
};
-// Keygen not yet implemented for OpenSSL: http://crbug.com/64917
-#if defined(USE_OPENSSL)
-#define MAYBE_ConcurrencyTest FAILS_ConcurrencyTest
-#else
-#define MAYBE_ConcurrencyTest ConcurrencyTest
-#endif
// We asynchronously generate the keys so as not to hang up the IO thread. This
// test tries to catch concurrency problems in the keygen implementation.
-TEST_F(KeygenHandlerTest, MAYBE_ConcurrencyTest) {
+TEST_F(KeygenHandlerTest, ConcurrencyTest) {
const int NUM_HANDLERS = 5;
base::WaitableEvent* events[NUM_HANDLERS] = { NULL };
std::string results[NUM_HANDLERS];
« net/base/keygen_handler_openssl.cc ('K') | « net/base/keygen_handler_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698