OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include "base/crypto/signature_verifier.h" | 5 #include "crypto/signature_verifier.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include "base/crypto/cssm_init.h" | |
10 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "crypto/cssm_init.h" |
11 | 11 |
12 namespace base { | 12 namespace crypto { |
13 | 13 |
14 SignatureVerifier::SignatureVerifier() : sig_handle_(0) { | 14 SignatureVerifier::SignatureVerifier() : sig_handle_(0) { |
15 EnsureCSSMInit(); | 15 EnsureCSSMInit(); |
16 } | 16 } |
17 | 17 |
18 SignatureVerifier::~SignatureVerifier() { | 18 SignatureVerifier::~SignatureVerifier() { |
19 Reset(); | 19 Reset(); |
20 } | 20 } |
21 | 21 |
22 bool SignatureVerifier::VerifyInit(const uint8* signature_algorithm, | 22 bool SignatureVerifier::VerifyInit(const uint8* signature_algorithm, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 crtn = CSSM_DeleteContext(sig_handle_); | 94 crtn = CSSM_DeleteContext(sig_handle_); |
95 DCHECK(crtn == CSSM_OK); | 95 DCHECK(crtn == CSSM_OK); |
96 sig_handle_ = 0; | 96 sig_handle_ = 0; |
97 } | 97 } |
98 signature_.clear(); | 98 signature_.clear(); |
99 | 99 |
100 // Can't call CSSM_FreeKey on public_key_ because we constructed | 100 // Can't call CSSM_FreeKey on public_key_ because we constructed |
101 // public_key_ manually. | 101 // public_key_ manually. |
102 } | 102 } |
103 | 103 |
104 } // namespace base | 104 } // namespace crypto |
105 | 105 |
OLD | NEW |