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

Side by Side Diff: base/crypto/signature_creator_mac.cc

Issue 2730015: Mac/clang: Uncontentious fixes. (Closed)
Patch Set: '' Created 10 years, 6 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
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 #include "base/crypto/signature_creator.h" 5 #include "base/crypto/signature_creator.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/crypto/cssm_init.h" 9 #include "base/crypto/cssm_init.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 13 matching lines...) Expand all
24 key->key(), 24 key->key(),
25 &result->sig_handle_); 25 &result->sig_handle_);
26 if (crtn) { 26 if (crtn) {
27 NOTREACHED(); 27 NOTREACHED();
28 return NULL; 28 return NULL;
29 } 29 }
30 30
31 crtn = CSSM_SignDataInit(result->sig_handle_); 31 crtn = CSSM_SignDataInit(result->sig_handle_);
32 if (crtn) { 32 if (crtn) {
33 NOTREACHED(); 33 NOTREACHED();
34 return false; 34 return NULL;
35 } 35 }
36 36
37 return result.release(); 37 return result.release();
38 } 38 }
39 39
40 SignatureCreator::SignatureCreator() : sig_handle_(0) { 40 SignatureCreator::SignatureCreator() : sig_handle_(0) {
41 EnsureCSSMInit(); 41 EnsureCSSMInit();
42 } 42 }
43 43
44 SignatureCreator::~SignatureCreator() { 44 SignatureCreator::~SignatureCreator() {
(...skipping 24 matching lines...) Expand all
69 } 69 }
70 70
71 signature->assign(sig.Data, sig.Data + sig.Length); 71 signature->assign(sig.Data, sig.Data + sig.Length);
72 kCssmMemoryFunctions.free_func(sig.Data, NULL); // Release data alloc'd 72 kCssmMemoryFunctions.free_func(sig.Data, NULL); // Release data alloc'd
73 // by CSSM 73 // by CSSM
74 74
75 return true; 75 return true;
76 } 76 }
77 77
78 } // namespace base 78 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/app_controller_mac.mm » ('j') | chrome/browser/cocoa/bookmark_button.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698