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

Side by Side Diff: crypto/signature_verifier_nss.cc

Issue 6805019: Move crypto files out of base, to a top level directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
OLDNEW
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 "base/crypto/signature_verifier.h"
6 6
7 #include <cryptohi.h> 7 #include <cryptohi.h>
8 #include <keyhi.h> 8 #include <keyhi.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/nss_util.h" 12 #include "base/nss_util.h"
13 13
14 namespace base { 14 namespace crypto {
15 15
16 SignatureVerifier::SignatureVerifier() : vfy_context_(NULL) { 16 SignatureVerifier::SignatureVerifier() : vfy_context_(NULL) {
17 EnsureNSSInit(); 17 EnsureNSSInit();
18 } 18 }
19 19
20 SignatureVerifier::~SignatureVerifier() { 20 SignatureVerifier::~SignatureVerifier() {
21 Reset(); 21 Reset();
22 } 22 }
23 23
24 bool SignatureVerifier::VerifyInit(const uint8* signature_algorithm, 24 bool SignatureVerifier::VerifyInit(const uint8* signature_algorithm,
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 } 103 }
104 104
105 void SignatureVerifier::Reset() { 105 void SignatureVerifier::Reset() {
106 if (vfy_context_) { 106 if (vfy_context_) {
107 VFY_DestroyContext(vfy_context_, PR_TRUE); 107 VFY_DestroyContext(vfy_context_, PR_TRUE);
108 vfy_context_ = NULL; 108 vfy_context_ = NULL;
109 } 109 }
110 signature_.clear(); 110 signature_.clear();
111 } 111 }
112 112
113 } // namespace base 113 } // namespace crypto
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698