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

Unified Diff: net/base/keygen_handler_openssl.cc

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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/keygen_handler_nss.cc ('k') | net/base/keygen_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/keygen_handler_openssl.cc
diff --git a/net/base/keygen_handler_openssl.cc b/net/base/keygen_handler_openssl.cc
deleted file mode 100644
index aeb64a8b543e4308aa2574237250544b4fe32f51..0000000000000000000000000000000000000000
--- a/net/base/keygen_handler_openssl.cc
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "net/base/keygen_handler.h"
-
-#include <openssl/ssl.h>
-
-#include "base/logging.h"
-#include "base/memory/scoped_ptr.h"
-#include "crypto/openssl_util.h"
-#include "crypto/rsa_private_key.h"
-#include "crypto/scoped_openssl_types.h"
-#include "net/base/openssl_private_key_store.h"
-
-namespace net {
-
-std::string KeygenHandler::GenKeyAndSignChallenge() {
- scoped_ptr<crypto::RSAPrivateKey> key(
- crypto::RSAPrivateKey::Create(key_size_in_bits_));
- EVP_PKEY* pkey = key->key();
-
- if (stores_key_)
- OpenSSLPrivateKeyStore::StoreKeyPair(url_, pkey);
-
- crypto::ScopedOpenSSL<NETSCAPE_SPKI, NETSCAPE_SPKI_free>::Type spki(
- NETSCAPE_SPKI_new());
- ASN1_STRING_set(spki.get()->spkac->challenge,
- challenge_.data(), challenge_.size());
- NETSCAPE_SPKI_set_pubkey(spki.get(), pkey);
- // Using MD5 as this is what is required in HTML5, even though the SPKI
- // structure does allow the use of a SHA-1 signature.
- NETSCAPE_SPKI_sign(spki.get(), pkey, EVP_md5());
- char* spkistr = NETSCAPE_SPKI_b64_encode(spki.get());
-
- std::string result(spkistr);
- OPENSSL_free(spkistr);
-
- return result;
-}
-
-} // namespace net
-
« no previous file with comments | « net/base/keygen_handler_nss.cc ('k') | net/base/keygen_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698