Commit c9c251d5 authored by rucifer1217@gmail.com's avatar rucifer1217@gmail.com

clean up code at crypto folder.

BUG=none

Review URL: https://codereview.chromium.org/407713002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284547 0039d316-1c4b-4281-b951-d872f2087c98
parent 4789e83b
......@@ -245,12 +245,12 @@ bool ECPrivateKey::ExportEncryptedPrivateKey(
};
SECKEYEncryptedPrivateKeyInfo* encrypted = PK11_ExportEncryptedPrivKeyInfo(
NULL, // Slot, optional.
NULL, // Slot, optional.
SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_3KEY_TRIPLE_DES_CBC,
&password_item,
key_,
iterations,
NULL); // wincx.
NULL); // wincx.
if (!encrypted) {
DLOG(ERROR) << "PK11_ExportEncryptedPrivKeyInfo: " << PORT_GetError();
......
......@@ -140,7 +140,6 @@ class CRYPTO_EXPORT MockAppleKeychain : public AppleKeychain {
int password_data_count() const { return password_data_count_; }
private:
// Type used for the keys in the std::map(s) and MockAppleKeychain items.
typedef uintptr_t MockKeychainItemType;
......
......@@ -873,8 +873,7 @@ class NSSInitSingleton {
if (db_slot) {
if (PK11_NeedUserInit(db_slot))
PK11_InitPin(db_slot, NULL, NULL);
}
else {
} else {
LOG(ERROR) << "Error opening persistent database (" << modspec
<< "): " << GetNSSErrorMessage();
}
......
......@@ -149,7 +149,7 @@ void ReduceLarge(FieldElement* out, LargeFieldElement* inptr) {
// Eliminate the term at 2*224 that we introduced while keeping the same
// value mod p.
in[0] -= in[8]; // reflection off the "+1" term of p.
(*out)[3] += static_cast<uint32>(in[8] & 0xffff) << 12; // "-2**96" term
(*out)[3] += static_cast<uint32>(in[8] & 0xffff) << 12; // "-2**96" term
(*out)[4] += static_cast<uint32>(in[8] >> 16); // rest of "-2**96" term
// in[0] < 2**64
// out[3] < 2**29
......@@ -638,7 +638,7 @@ void Put224Bits(uint32* out, const uint32* in) {
out[0] = HostToNet32((in[6] >> 24) | (in[7] << 4));
}
} // anonymous namespace
} // anonymous namespace
namespace crypto {
......
......@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include <crypto/p224_spake.h>
#include "base/logging.h"
......@@ -13,7 +14,6 @@ namespace {
bool RunExchange(P224EncryptedKeyExchange* client,
P224EncryptedKeyExchange* server) {
for (;;) {
std::string client_message, server_message;
client_message = client->GetMessage();
......
This diff is collapsed.
......@@ -4,6 +4,8 @@
#include "crypto/secure_hash.h"
#include <string>
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/pickle.h"
......
......@@ -5,10 +5,9 @@
#ifndef CRYPTO_SIGNATURE_CREATOR_H_
#define CRYPTO_SIGNATURE_CREATOR_H_
#include "build/build_config.h"
#include <vector>
#include "build/build_config.h"
#include "base/basictypes.h"
#include "crypto/crypto_export.h"
......
......@@ -5,10 +5,9 @@
#ifndef CRYPTO_SIGNATURE_VERIFIER_H_
#define CRYPTO_SIGNATURE_VERIFIER_H_
#include "build/build_config.h"
#include <vector>
#include "build/build_config.h"
#include "base/basictypes.h"
#include "crypto/crypto_export.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment