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

Side by Side Diff: nss/mozilla/security/nss/lib/pk11wrap/pk11merge.c

Issue 10540165: Update NSS to NSS 3.13.5 (from NSS 3.13.3). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 8 years, 6 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
OLDNEW
1 /* 1 /*
2 * Merge the source token into the target token. 2 * Merge the source token into the target token.
3 */ 3 */
4 4
5 #include "secmod.h" 5 #include "secmod.h"
6 #include "secmodi.h" 6 #include "secmodi.h"
7 #include "secmodti.h" 7 #include "secmodti.h"
8 #include "pk11pub.h" 8 #include "pk11pub.h"
9 #include "pk11priv.h" 9 #include "pk11priv.h"
10 #include "pkcs11.h" 10 #include "pkcs11.h"
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1102 /* a matching trust record already exists, merge it in */ 1102 /* a matching trust record already exists, merge it in */
1103 CK_ATTRIBUTE_TYPE trustAttrs[] = { 1103 CK_ATTRIBUTE_TYPE trustAttrs[] = {
1104 CKA_TRUST_SERVER_AUTH, CKA_TRUST_CLIENT_AUTH, 1104 CKA_TRUST_SERVER_AUTH, CKA_TRUST_CLIENT_AUTH,
1105 CKA_TRUST_CODE_SIGNING, CKA_TRUST_EMAIL_PROTECTION, 1105 CKA_TRUST_CODE_SIGNING, CKA_TRUST_EMAIL_PROTECTION,
1106 CKA_TRUST_IPSEC_TUNNEL, CKA_TRUST_IPSEC_USER, 1106 CKA_TRUST_IPSEC_TUNNEL, CKA_TRUST_IPSEC_USER,
1107 CKA_TRUST_TIME_STAMPING 1107 CKA_TRUST_TIME_STAMPING
1108 }; 1108 };
1109 CK_ULONG trustAttrsCount = 1109 CK_ULONG trustAttrsCount =
1110 sizeof(trustAttrs)/sizeof(trustAttrs[0]); 1110 sizeof(trustAttrs)/sizeof(trustAttrs[0]);
1111 1111
1112 » int i; 1112 » CK_ULONG i;
1113 CK_ATTRIBUTE targetTemplate, sourceTemplate; 1113 CK_ATTRIBUTE targetTemplate, sourceTemplate;
1114 1114
1115 /* existing trust record, merge the two together */ 1115 /* existing trust record, merge the two together */
1116 for (i=0; i < trustAttrsCount; i++) { 1116 for (i=0; i < trustAttrsCount; i++) {
1117 targetTemplate.type = sourceTemplate.type = trustAttrs[i]; 1117 targetTemplate.type = sourceTemplate.type = trustAttrs[i];
1118 targetTemplate.pValue = sourceTemplate.pValue = NULL; 1118 targetTemplate.pValue = sourceTemplate.pValue = NULL;
1119 targetTemplate.ulValueLen = sourceTemplate.ulValueLen = 0; 1119 targetTemplate.ulValueLen = sourceTemplate.ulValueLen = 0;
1120 PK11_GetAttributes(arena, sourceSlot, id, &sourceTemplate, 1); 1120 PK11_GetAttributes(arena, sourceSlot, id, &sourceTemplate, 1);
1121 PK11_GetAttributes(arena, targetSlot, targetTrustID, 1121 PK11_GetAttributes(arena, targetSlot, targetTrustID,
1122 &targetTemplate, 1); 1122 &targetTemplate, 1);
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 return log; 1404 return log;
1405 } 1405 }
1406 1406
1407 void 1407 void
1408 PK11_DestroyMergeLog(PK11MergeLog *log) 1408 PK11_DestroyMergeLog(PK11MergeLog *log)
1409 { 1409 {
1410 if (log && log->arena) { 1410 if (log && log->arena) {
1411 PORT_FreeArena(log->arena, PR_FALSE); 1411 PORT_FreeArena(log->arena, PR_FALSE);
1412 } 1412 }
1413 } 1413 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698