| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CRYPTO_SCOPED_NSS_TYPES_H_ | 5 #ifndef CRYPTO_SCOPED_NSS_TYPES_H_ |
| 6 #define CRYPTO_SCOPED_NSS_TYPES_H_ | 6 #define CRYPTO_SCOPED_NSS_TYPES_H_ |
| 7 | 7 |
| 8 #include <keyhi.h> | 8 #include <keyhi.h> |
| 9 #include <nss.h> | 9 #include <nss.h> |
| 10 #include <pk11pub.h> | 10 #include <pk11pub.h> |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 // Define some convenient scopers around NSS pointers. | 33 // Define some convenient scopers around NSS pointers. |
| 34 typedef scoped_ptr_malloc< | 34 typedef scoped_ptr_malloc< |
| 35 PK11Context, NSSDestroyer1<PK11Context, | 35 PK11Context, NSSDestroyer1<PK11Context, |
| 36 PK11_DestroyContext, | 36 PK11_DestroyContext, |
| 37 PR_TRUE> > ScopedPK11Context; | 37 PR_TRUE> > ScopedPK11Context; |
| 38 typedef scoped_ptr_malloc< | 38 typedef scoped_ptr_malloc< |
| 39 PK11SlotInfo, NSSDestroyer<PK11SlotInfo, PK11_FreeSlot> > ScopedPK11Slot; | 39 PK11SlotInfo, NSSDestroyer<PK11SlotInfo, PK11_FreeSlot> > ScopedPK11Slot; |
| 40 typedef scoped_ptr_malloc< | 40 typedef scoped_ptr_malloc< |
| 41 PK11SlotList, NSSDestroyer<PK11SlotList, |
| 42 PK11_FreeSlotList> > ScopedPK11SlotList; |
| 43 typedef scoped_ptr_malloc< |
| 41 PK11SymKey, NSSDestroyer<PK11SymKey, PK11_FreeSymKey> > ScopedPK11SymKey; | 44 PK11SymKey, NSSDestroyer<PK11SymKey, PK11_FreeSymKey> > ScopedPK11SymKey; |
| 42 typedef scoped_ptr_malloc< | 45 typedef scoped_ptr_malloc< |
| 43 SECKEYPublicKey, NSSDestroyer<SECKEYPublicKey, SECKEY_DestroyPublicKey> > | 46 SECKEYPublicKey, NSSDestroyer<SECKEYPublicKey, SECKEY_DestroyPublicKey> > |
| 44 ScopedSECKEYPublicKey; | 47 ScopedSECKEYPublicKey; |
| 45 typedef scoped_ptr_malloc< | 48 typedef scoped_ptr_malloc< |
| 46 SECKEYPrivateKey, NSSDestroyer<SECKEYPrivateKey, SECKEY_DestroyPrivateKey> > | 49 SECKEYPrivateKey, NSSDestroyer<SECKEYPrivateKey, SECKEY_DestroyPrivateKey> > |
| 47 ScopedSECKEYPrivateKey; | 50 ScopedSECKEYPrivateKey; |
| 48 typedef scoped_ptr_malloc< | 51 typedef scoped_ptr_malloc< |
| 49 SECAlgorithmID, NSSDestroyer1<SECAlgorithmID, | 52 SECAlgorithmID, NSSDestroyer1<SECAlgorithmID, |
| 50 SECOID_DestroyAlgorithmID, | 53 SECOID_DestroyAlgorithmID, |
| 51 PR_TRUE> > ScopedSECAlgorithmID; | 54 PR_TRUE> > ScopedSECAlgorithmID; |
| 52 typedef scoped_ptr_malloc< | 55 typedef scoped_ptr_malloc< |
| 53 SECItem, NSSDestroyer1<SECItem, | 56 SECItem, NSSDestroyer1<SECItem, |
| 54 SECITEM_FreeItem, | 57 SECITEM_FreeItem, |
| 55 PR_TRUE> > ScopedSECItem; | 58 PR_TRUE> > ScopedSECItem; |
| 56 typedef scoped_ptr_malloc< | 59 typedef scoped_ptr_malloc< |
| 57 PLArenaPool, NSSDestroyer1<PLArenaPool, | 60 PLArenaPool, NSSDestroyer1<PLArenaPool, |
| 58 PORT_FreeArena, | 61 PORT_FreeArena, |
| 59 PR_FALSE> > ScopedPLArenaPool; | 62 PR_FALSE> > ScopedPLArenaPool; |
| 60 | 63 |
| 61 } // namespace crypto | 64 } // namespace crypto |
| 62 | 65 |
| 63 #endif // CRYPTO_SCOPED_NSS_TYPES_H_ | 66 #endif // CRYPTO_SCOPED_NSS_TYPES_H_ |
| OLD | NEW |