Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Dec 2020 00:37:21 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r559326 - in head/security/nss: . files
Message-ID:  <202012270037.0BR0bLuh074572@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Sun Dec 27 00:37:20 2020
New Revision: 559326
URL: https://svnweb.freebsd.org/changeset/ports/559326

Log:
  security/nss: update to 3.60.1
  
  - Temporarily patch-update due to missing distfile
  
  Changes:	https://developer.mozilla.org/docs/Mozilla/Projects/NSS/NSS_3.60.1_release_notes
  Changes:	https://hg.mozilla.org/projects/nss/shortlog/NSS_3_60_1_RTM
  ABI:		https://abi-laboratory.pro/tracker/timeline/nss/

Added:
  head/security/nss/files/patch-3.60.1   (contents, props changed)
Modified:
  head/security/nss/Makefile   (contents, props changed)

Modified: head/security/nss/Makefile
==============================================================================
--- head/security/nss/Makefile	Sun Dec 27 00:37:12 2020	(r559325)
+++ head/security/nss/Makefile	Sun Dec 27 00:37:20 2020	(r559326)
@@ -2,9 +2,10 @@
 # $FreeBSD$
 
 PORTNAME=	nss
-PORTVERSION=	3.60
+PORTVERSION=	3.60.1
 CATEGORIES=	security
 MASTER_SITES=	MOZILLA/security/${PORTNAME}/releases/${DISTNAME:tu:C/[-.]/_/g}_RTM/src
+DISTNAME=	${PORTNAME}-3.60 # XXX Drop after 3.60.1 distfile appears
 
 MAINTAINER=	gecko@FreeBSD.org
 COMMENT=	Libraries to support development of security-enabled applications

Added: head/security/nss/files/patch-3.60.1
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/nss/files/patch-3.60.1	Sun Dec 27 00:37:20 2020	(r559326)
@@ -0,0 +1,152 @@
+Generated by git diff --no-prefix NSS_3_60_RTM..NSS_3_60_1_RTM
+https://hg.mozilla.org/projects/nss/rev/b47465be3b6f
+https://hg.mozilla.org/projects/nss/rev/83173cdd72f6
+
+diff --git lib/dev/devslot.c lib/dev/devslot.c
+index 3f4e54e061..5021408bf0 100644
+--- lib/dev/devslot.c
++++ lib/dev/devslot.c
+@@ -171,12 +171,11 @@ nssSlot_IsTokenPresent(
+ 
+     nssSlot_EnterMonitor(slot);
+     ckrv = CKAPI(epv)->C_GetSlotInfo(slot->slotID, &slotInfo);
++    nssSlot_ExitMonitor(slot);
+     if (ckrv != CKR_OK) {
+-        if (slot->token) {
+-            slot->token->base.name[0] = 0; /* XXX */
+-        }
++        slot->token->base.name[0] = 0; /* XXX */
+         isPresent = PR_FALSE;
+-        goto done; /* slot lock held */
++        goto done;
+     }
+     slot->ckFlags = slotInfo.flags;
+     /* check for the presence of the token */
+@@ -184,11 +183,10 @@ nssSlot_IsTokenPresent(
+         if (!slot->token) {
+             /* token was never present */
+             isPresent = PR_FALSE;
+-            goto done; /* slot lock held */
++            goto done;
+         }
+         session = nssToken_GetDefaultSession(slot->token);
+         if (session) {
+-            nssSlot_ExitMonitor(slot);
+             nssSession_EnterMonitor(session);
+             /* token is not present */
+             if (session->handle != CK_INVALID_HANDLE) {
+@@ -198,12 +196,6 @@ nssSlot_IsTokenPresent(
+                 session->handle = CK_INVALID_HANDLE;
+             }
+             nssSession_ExitMonitor(session);
+-            nssSlot_EnterMonitor(slot);
+-            if (!slot->token) {
+-                /* Check token presence after re-acquiring lock */
+-                isPresent = PR_FALSE;
+-                goto done; /* slot lock held */
+-            }
+         }
+         if (slot->token->base.name[0] != 0) {
+             /* notify the high-level cache that the token is removed */
+@@ -214,23 +206,14 @@ nssSlot_IsTokenPresent(
+         /* clear the token cache */
+         nssToken_Remove(slot->token);
+         isPresent = PR_FALSE;
+-        goto done; /* slot lock held */
+-    }
+-    if (!slot->token) {
+-        /* This should not occur, based on the fact that the
+-         * below calls will dereference NULL otherwise. */
+-        PORT_Assert(0);
+-        isPresent = PR_FALSE;
+-        goto done; /* slot lock held */
++        goto done;
+     }
+-
+     /* token is present, use the session info to determine if the card
+      * has been removed and reinserted.
+      */
+     session = nssToken_GetDefaultSession(slot->token);
+     if (session) {
+         PRBool tokenRemoved;
+-        nssSlot_ExitMonitor(slot);
+         nssSession_EnterMonitor(session);
+         if (session->handle != CK_INVALID_HANDLE) {
+             CK_SESSION_INFO sessionInfo;
+@@ -244,16 +227,10 @@ nssSlot_IsTokenPresent(
+         }
+         tokenRemoved = (session->handle == CK_INVALID_HANDLE);
+         nssSession_ExitMonitor(session);
+-        nssSlot_EnterMonitor(slot);
+         /* token not removed, finished */
+         if (!tokenRemoved) {
+             isPresent = PR_TRUE;
+-            goto done; /* slot lock held */
+-        }
+-        if (!slot->token) {
+-            /* Check token presence after re-acquiring lock */
+-            isPresent = PR_FALSE;
+-            goto done; /* slot lock held */
++            goto done;
+         }
+     }
+     /* the token has been removed, and reinserted, or the slot contains
+@@ -271,7 +248,6 @@ nssSlot_IsTokenPresent(
+         isPresent = PR_FALSE;
+     }
+ done:
+-    nssSlot_ExitMonitor(slot);
+     /* Once we've set up the condition variable,
+      * Before returning, it's necessary to:
+      *  1) Set the lastTokenPingTime so that any other threads waiting on this
+diff --git lib/nss/nss.h lib/nss/nss.h
+index 4a87939bdd..0fd14629e3 100644
+--- lib/nss/nss.h
++++ lib/nss/nss.h
+@@ -22,10 +22,10 @@
+  * The format of the version string should be
+  *     "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
+  */
+-#define NSS_VERSION "3.60" _NSS_CUSTOMIZED
++#define NSS_VERSION "3.60.1" _NSS_CUSTOMIZED
+ #define NSS_VMAJOR 3
+ #define NSS_VMINOR 60
+-#define NSS_VPATCH 0
++#define NSS_VPATCH 1
+ #define NSS_VBUILD 0
+ #define NSS_BETA PR_FALSE
+ 
+diff --git lib/softoken/softkver.h lib/softoken/softkver.h
+index 16e0e6b523..4b5b66d8f2 100644
+--- lib/softoken/softkver.h
++++ lib/softoken/softkver.h
+@@ -17,10 +17,10 @@
+  * The format of the version string should be
+  *     "<major version>.<minor version>[.<patch level>[.<build number>]][ <ECC>][ <Beta>]"
+  */
+-#define SOFTOKEN_VERSION "3.60" SOFTOKEN_ECC_STRING
++#define SOFTOKEN_VERSION "3.60.1" SOFTOKEN_ECC_STRING
+ #define SOFTOKEN_VMAJOR 3
+ #define SOFTOKEN_VMINOR 60
+-#define SOFTOKEN_VPATCH 0
++#define SOFTOKEN_VPATCH 1
+ #define SOFTOKEN_VBUILD 0
+ #define SOFTOKEN_BETA PR_FALSE
+ 
+diff --git lib/util/nssutil.h lib/util/nssutil.h
+index 6db5095718..98f3aaf493 100644
+--- lib/util/nssutil.h
++++ lib/util/nssutil.h
+@@ -19,10 +19,10 @@
+  * The format of the version string should be
+  *     "<major version>.<minor version>[.<patch level>[.<build number>]][ <Beta>]"
+  */
+-#define NSSUTIL_VERSION "3.60"
++#define NSSUTIL_VERSION "3.60.1"
+ #define NSSUTIL_VMAJOR 3
+ #define NSSUTIL_VMINOR 60
+-#define NSSUTIL_VPATCH 0
++#define NSSUTIL_VPATCH 1
+ #define NSSUTIL_VBUILD 0
+ #define NSSUTIL_BETA PR_FALSE
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012270037.0BR0bLuh074572>