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

Unified Diff: patches/nss-der-encode-time-choice.patch

Issue 10961060: Update NSS to NSS 3.14 Beta 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Merge nss-static2.patch into nss-static.patch Created 8 years, 3 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
Index: patches/nss-der-encode-time-choice.patch
===================================================================
--- patches/nss-der-encode-time-choice.patch (revision 158129)
+++ patches/nss-der-encode-time-choice.patch (working copy)
@@ -1,35 +0,0 @@
-Index: mozilla/security/nss/lib/util/sectime.c
-===================================================================
---- mozilla/security/nss/lib/util/sectime.c (revision 152884)
-+++ mozilla/security/nss/lib/util/sectime.c (working copy)
-@@ -34,14 +34,11 @@
- *
- * ***** END LICENSE BLOCK ***** */
-
--#include "prlong.h"
- #include "prtime.h"
- #include "secder.h"
- #include "secitem.h"
- #include "secerr.h"
-
--static const PRTime January1st2050 = LL_INIT(0x0008f81e, 0x1b098000);
--
- static char *DecodeUTCTime2FormattedAscii (SECItem *utcTimeDER, char *format);
- static char *DecodeGeneralizedTime2FormattedAscii (SECItem *generalizedTimeDER, char *format);
-
-@@ -186,9 +183,11 @@
-
- SECStatus DER_EncodeTimeChoice(PRArenaPool* arena, SECItem* output, PRTime input)
- {
-- if (LL_CMP(input, >, January1st2050)) {
-- return DER_TimeToGeneralizedTimeArena(arena, output, input);
-- } else {
-- return DER_TimeToUTCTimeArena(arena, output, input);
-+ SECStatus rv;
-+
-+ rv = DER_TimeToUTCTimeArena(arena, output, input);
-+ if (rv == SECSuccess || PORT_GetError() != SEC_ERROR_INVALID_ARGS) {
-+ return rv;
- }
-+ return DER_TimeToGeneralizedTimeArena(arena, output, input);
- }

Powered by Google App Engine
This is Rietveld 408576698