OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "net/base/keygen_handler.h" | 5 #include "net/base/keygen_handler.h" |
6 | 6 |
7 #include <Security/SecAsn1Coder.h> | 7 #include <Security/SecAsn1Coder.h> |
8 #include <Security/SecAsn1Templates.h> | 8 #include <Security/SecAsn1Templates.h> |
9 #include <Security/Security.h> | 9 #include <Security/Security.h> |
10 | 10 |
11 #include "base/base64.h" | 11 #include "base/base64.h" |
12 #include "base/crypto/cssm_init.h" | 12 #include "base/crypto/cssm_init.h" |
| 13 #include "base/crypto/mac_security_services_lock.h" |
13 #include "base/logging.h" | 14 #include "base/logging.h" |
14 #include "base/mac/scoped_cftyperef.h" | 15 #include "base/mac/scoped_cftyperef.h" |
15 #include "base/string_util.h" | 16 #include "base/string_util.h" |
16 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
17 #include "base/sys_string_conversions.h" | 18 #include "base/sys_string_conversions.h" |
18 | 19 |
19 // These are in Security.framework but not declared in a public header. | 20 // These are in Security.framework but not declared in a public header. |
20 extern const SecAsn1Template kSecAsn1AlgorithmIDTemplate[]; | 21 extern const SecAsn1Template kSecAsn1AlgorithmIDTemplate[]; |
21 extern const SecAsn1Template kSecAsn1SubjectPublicKeyInfoTemplate[]; | 22 extern const SecAsn1Template kSecAsn1SubjectPublicKeyInfoTemplate[]; |
22 | 23 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 return err; | 315 return err; |
315 } | 316 } |
316 err = CSSM_SignData(cc_handle, &data, 1, CSSM_ALGID_NONE, signature); | 317 err = CSSM_SignData(cc_handle, &data, 1, CSSM_ALGID_NONE, signature); |
317 if (err) | 318 if (err) |
318 base::LogCSSMError("CSSM_SignData", err); | 319 base::LogCSSMError("CSSM_SignData", err); |
319 CSSM_DeleteContext(cc_handle); | 320 CSSM_DeleteContext(cc_handle); |
320 return err; | 321 return err; |
321 } | 322 } |
322 | 323 |
323 } // namespace net | 324 } // namespace net |
OLD | NEW |