| OLD | NEW | 
|---|
| 1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public | 
| 2  * License, v. 2.0. If a copy of the MPL was not distributed with this | 2  * License, v. 2.0. If a copy of the MPL was not distributed with this | 
| 3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 
| 4 /* | 4 /* | 
| 5  * This file manages object type indepentent functions. | 5  * This file manages object type indepentent functions. | 
| 6  */ | 6  */ | 
| 7 #include "seccomon.h" | 7 #include "seccomon.h" | 
| 8 #include "secmod.h" | 8 #include "secmod.h" | 
| 9 #include "secmodi.h" | 9 #include "secmodi.h" | 
| 10 #include "secmodti.h" | 10 #include "secmodti.h" | 
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 74         PORT_SetError(PK11_MapError(crv)); | 74         PORT_SetError(PK11_MapError(crv)); | 
| 75     } | 75     } | 
| 76     PK11_RestoreROSession(slot,rwsession); | 76     PK11_RestoreROSession(slot,rwsession); | 
| 77     return rv; | 77     return rv; | 
| 78 } | 78 } | 
| 79 | 79 | 
| 80 /* | 80 /* | 
| 81  * Read in a single attribute into a SECItem. Allocate space for it with | 81  * Read in a single attribute into a SECItem. Allocate space for it with | 
| 82  * PORT_Alloc unless an arena is supplied. In the latter case use the arena | 82  * PORT_Alloc unless an arena is supplied. In the latter case use the arena | 
| 83  * to allocate the space. | 83  * to allocate the space. | 
|  | 84  * | 
|  | 85  * PK11_ReadAttribute sets the 'data' and 'len' fields of the SECItem but | 
|  | 86  * does not modify its 'type' field. | 
| 84  */ | 87  */ | 
| 85 SECStatus | 88 SECStatus | 
| 86 PK11_ReadAttribute(PK11SlotInfo *slot, CK_OBJECT_HANDLE id, | 89 PK11_ReadAttribute(PK11SlotInfo *slot, CK_OBJECT_HANDLE id, | 
| 87          CK_ATTRIBUTE_TYPE type, PLArenaPool *arena, SECItem *result) { | 90          CK_ATTRIBUTE_TYPE type, PLArenaPool *arena, SECItem *result) { | 
| 88     CK_ATTRIBUTE attr = { 0, NULL, 0 }; | 91     CK_ATTRIBUTE attr = { 0, NULL, 0 }; | 
| 89     CK_RV crv; | 92     CK_RV crv; | 
| 90 | 93 | 
| 91     attr.type = type; | 94     attr.type = type; | 
| 92 | 95 | 
| 93     PK11_EnterSlotMonitor(slot); | 96     PK11_EnterSlotMonitor(slot); | 
| (...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1969         PORT_SetError( PK11_MapError(crv) ); | 1972         PORT_SetError( PK11_MapError(crv) ); | 
| 1970         return NULL; | 1973         return NULL; | 
| 1971     } | 1974     } | 
| 1972 | 1975 | 
| 1973     item->data = (unsigned char*) theTemplate[0].pValue; | 1976     item->data = (unsigned char*) theTemplate[0].pValue; | 
| 1974     item->len =theTemplate[0].ulValueLen; | 1977     item->len =theTemplate[0].ulValueLen; | 
| 1975 | 1978 | 
| 1976     return item; | 1979     return item; | 
| 1977 } | 1980 } | 
| 1978 | 1981 | 
| OLD | NEW | 
|---|