| OLD | NEW |
| 1 // Copyright (c) 2011 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 "crypto/capi_util.h" | 5 #include "crypto/capi_util.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 BOOL CryptAcquireContextLocked(HCRYPTPROV* prov, | 40 BOOL CryptAcquireContextLocked(HCRYPTPROV* prov, |
| 41 LPCWSTR container, | 41 LPCWSTR container, |
| 42 LPCWSTR provider, | 42 LPCWSTR provider, |
| 43 DWORD prov_type, | 43 DWORD prov_type, |
| 44 DWORD flags) { | 44 DWORD flags) { |
| 45 base::AutoLock lock(CAPIUtilSingleton::GetInstance()->acquire_context_lock()); | 45 base::AutoLock lock(CAPIUtilSingleton::GetInstance()->acquire_context_lock()); |
| 46 return CryptAcquireContext(prov, container, provider, prov_type, flags); | 46 return CryptAcquireContext(prov, container, provider, prov_type, flags); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void* WINAPI CryptAlloc(size_t size) { |
| 50 return malloc(size); |
| 51 } |
| 52 |
| 53 void WINAPI CryptFree(void* p) { |
| 54 free(p); |
| 55 } |
| 56 |
| 49 } // namespace crypto | 57 } // namespace crypto |
| OLD | NEW |