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

Unified Diff: nss/lib/certdb/genname.c

Issue 1504923011: Update NSS to 3.21 RTM and NSPR to 4.11 RTM (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/nss
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: nss/lib/certdb/genname.c
diff --git a/nss/lib/certdb/genname.c b/nss/lib/certdb/genname.c
index e3bc11d59109d83a24daaf82aacd91a4969e49c1..6529a6a097a07af30e006735fcc87d084d63c351 100644
--- a/nss/lib/certdb/genname.c
+++ b/nss/lib/certdb/genname.c
@@ -67,16 +67,6 @@ static const SEC_ASN1Template CERTOtherNameTemplate[] = {
sizeof(CERTGeneralName) }
};
-static const SEC_ASN1Template CERTOtherName2Template[] = {
- { SEC_ASN1_SEQUENCE | SEC_ASN1_CONTEXT_SPECIFIC | 0 ,
- 0, NULL, sizeof(CERTGeneralName) },
- { SEC_ASN1_OBJECT_ID,
- offsetof(CERTGeneralName, name.OthName) + offsetof(OtherName, oid) },
- { SEC_ASN1_ANY,
- offsetof(CERTGeneralName, name.OthName) + offsetof(OtherName, name) },
- { 0, }
-};
-
static const SEC_ASN1Template CERT_RFC822NameTemplate[] = {
{ SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 1 ,
offsetof(CERTGeneralName, name.other),
@@ -684,7 +674,7 @@ loser:
return NULL;
}
-CERTNameConstraint *
+static CERTNameConstraint *
cert_DecodeNameConstraintSubTree(PLArenaPool *arena,
SECItem **subTree,
PRBool permited)
@@ -701,15 +691,17 @@ cert_DecodeNameConstraintSubTree(PLArenaPool *arena,
if (current == NULL) {
goto loser;
}
- if (last == NULL) {
- first = last = current;
+ if (first == NULL) {
+ first = current;
+ } else {
+ current->l.prev = &(last->l);
+ last->l.next = &(current->l);
}
- current->l.prev = &(last->l);
- current->l.next = last->l.next;
- last->l.next = &(current->l);
+ last = current;
i++;
}
- first->l.prev = &(current->l);
+ first->l.prev = &(last->l);
+ last->l.next = &(first->l);
/* TODO: unmark arena */
return first;
loser:

Powered by Google App Engine
This is Rietveld 408576698