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

Side by Side Diff: base/crypto/signature_verifier.h

Issue 1528021: Implement PBKDF2-based key derivation, random key generation,... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Make albertb's suggested changes. Created 10 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/crypto/signature_creator_win.cc ('k') | base/crypto/signature_verifier_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_CRYPTO_SIGNATURE_VERIFIER_H_ 5 #ifndef BASE_CRYPTO_SIGNATURE_VERIFIER_H_
6 #define BASE_CRYPTO_SIGNATURE_VERIFIER_H_ 6 #define BASE_CRYPTO_SIGNATURE_VERIFIER_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(USE_NSS) 10 #if defined(USE_NSS)
11 #include <cryptoht.h> 11 #include <cryptoht.h>
12 #elif defined(OS_MACOSX) 12 #elif defined(OS_MACOSX)
13 #include <Security/cssm.h> 13 #include <Security/cssm.h>
14 #elif defined(OS_WIN)
15 #include <windows.h>
16 #include <wincrypt.h>
17 #endif 14 #endif
18 15
19 #include <vector> 16 #include <vector>
20 17
21 #include "base/basictypes.h" 18 #include "base/basictypes.h"
22 19
20 #if defined(OS_WIN)
21 #include "base/crypto/scoped_capi_types.h"
22 #endif
23
23 namespace base { 24 namespace base {
24 25
25 // The SignatureVerifier class verifies a signature using a bare public key 26 // The SignatureVerifier class verifies a signature using a bare public key
26 // (as opposed to a certificate). 27 // (as opposed to a certificate).
27 class SignatureVerifier { 28 class SignatureVerifier {
28 public: 29 public:
29 SignatureVerifier(); 30 SignatureVerifier();
30 ~SignatureVerifier(); 31 ~SignatureVerifier();
31 32
32 // Streaming interface: 33 // Streaming interface:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 84
84 #if defined(USE_NSS) 85 #if defined(USE_NSS)
85 VFYContext* vfy_context_; 86 VFYContext* vfy_context_;
86 #elif defined(OS_MACOSX) 87 #elif defined(OS_MACOSX)
87 std::vector<uint8> public_key_info_; 88 std::vector<uint8> public_key_info_;
88 89
89 CSSM_CC_HANDLE sig_handle_; 90 CSSM_CC_HANDLE sig_handle_;
90 91
91 CSSM_KEY public_key_; 92 CSSM_KEY public_key_;
92 #elif defined(OS_WIN) 93 #elif defined(OS_WIN)
93 HCRYPTPROV provider_; 94 ScopedHCRYPTPROV provider_;
94 95
95 HCRYPTHASH hash_object_; 96 ScopedHCRYPTHASH hash_object_;
96 97
97 HCRYPTKEY public_key_; 98 ScopedHCRYPTKEY public_key_;
98 #endif 99 #endif
99 }; 100 };
100 101
101 } // namespace base 102 } // namespace base
102 103
103 #endif // BASE_CRYPTO_SIGNATURE_VERIFIER_H_ 104 #endif // BASE_CRYPTO_SIGNATURE_VERIFIER_H_
OLDNEW
« no previous file with comments | « base/crypto/signature_creator_win.cc ('k') | base/crypto/signature_verifier_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698