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

Unified Diff: nss/mozilla/security/nss/lib/certhigh/certreq.c

Issue 3536010: Update to NSS 3.12.8. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/
Patch Set: Created 10 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nss/mozilla/security/nss/lib/certhigh/certhtml.c ('k') | nss/mozilla/security/nss/lib/nss/nss.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: nss/mozilla/security/nss/lib/certhigh/certreq.c
===================================================================
--- nss/mozilla/security/nss/lib/certhigh/certreq.c (revision 61548)
+++ nss/mozilla/security/nss/lib/certhigh/certreq.c (working copy)
@@ -94,35 +94,39 @@
c = (CERTCertificate *)PORT_ArenaZAlloc(arena, sizeof(CERTCertificate));
- if (c) {
- c->referenceCount = 1;
- c->arena = arena;
+ if (!c) {
+ PORT_FreeArena(arena, PR_FALSE);
+ return 0;
+ }
- /*
- * Default is a plain version 1.
- * If extensions are added, it will get changed as appropriate.
- */
- rv = DER_SetUInteger(arena, &c->version, SEC_CERTIFICATE_VERSION_1);
- if (rv) goto loser;
+ c->referenceCount = 1;
+ c->arena = arena;
- rv = DER_SetUInteger(arena, &c->serialNumber, serialNumber);
- if (rv) goto loser;
+ /*
+ * Default is a plain version 1.
+ * If extensions are added, it will get changed as appropriate.
+ */
+ rv = DER_SetUInteger(arena, &c->version, SEC_CERTIFICATE_VERSION_1);
+ if (rv) goto loser;
- rv = CERT_CopyName(arena, &c->issuer, issuer);
- if (rv) goto loser;
+ rv = DER_SetUInteger(arena, &c->serialNumber, serialNumber);
+ if (rv) goto loser;
- rv = CERT_CopyValidity(arena, &c->validity, validity);
- if (rv) goto loser;
+ rv = CERT_CopyName(arena, &c->issuer, issuer);
+ if (rv) goto loser;
- rv = CERT_CopyName(arena, &c->subject, &req->subject);
- if (rv) goto loser;
- rv = SECKEY_CopySubjectPublicKeyInfo(arena, &c->subjectPublicKeyInfo,
- &req->subjectPublicKeyInfo);
- if (rv) goto loser;
- }
+ rv = CERT_CopyValidity(arena, &c->validity, validity);
+ if (rv) goto loser;
+
+ rv = CERT_CopyName(arena, &c->subject, &req->subject);
+ if (rv) goto loser;
+ rv = SECKEY_CopySubjectPublicKeyInfo(arena, &c->subjectPublicKeyInfo,
+ &req->subjectPublicKeyInfo);
+ if (rv) goto loser;
+
return c;
- loser:
+ loser:
CERT_DestroyCertificate(c);
return 0;
}
« no previous file with comments | « nss/mozilla/security/nss/lib/certhigh/certhtml.c ('k') | nss/mozilla/security/nss/lib/nss/nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698