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

Side by Side Diff: nss/lib/pk11wrap/pk11obj.c

Issue 205343004: Add PK11_ExportDERPrivateKeyInfo and PK11_ExportPrivKeyInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Fix placement of * Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « nss/lib/pk11wrap/pk11akey.c ('k') | nss/lib/pk11wrap/pk11pk12.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « nss/lib/pk11wrap/pk11akey.c ('k') | nss/lib/pk11wrap/pk11pk12.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698