Can confirm on Ubuntu Jammy, package fixes the issue:

```console
vagrant@ubuntu2204:~/Downloads$ wget 
https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+files/libnss3_3.98-0ubuntu0.22.04.2_amd64.deb
--2024-04-11 15:58:37--  
https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+files/libnss3_3.98-0ubuntu0.22.04.2_amd64.deb
Resolving launchpad.net (launchpad.net)... 185.125.189.222, 185.125.189.223, 
2620:2d:4000:1009::3ba, ...
Connecting to launchpad.net (launchpad.net)|185.125.189.222|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: 
https://launchpadlibrarian.net/724214470/libnss3_3.98-0ubuntu0.22.04.2_amd64.deb
 [following]
--2024-04-11 15:58:37--  
https://launchpadlibrarian.net/724214470/libnss3_3.98-0ubuntu0.22.04.2_amd64.deb
Resolving launchpadlibrarian.net (launchpadlibrarian.net)... 185.125.189.228, 
185.125.189.229, 2620:2d:4000:1009::13e, ...
Connecting to launchpadlibrarian.net 
(launchpadlibrarian.net)|185.125.189.228|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1346964 (1.3M) [application/x-debian-package]
Saving to: ‘libnss3_3.98-0ubuntu0.22.04.2_amd64.deb’

libnss3_3.98-0ubuntu0.22.04.2_amd64.deb
100%[====================================================================================================>]
1.28M  4.87MB/s    in 0.3s

2024-04-11 15:58:37 (4.87 MB/s) -
‘libnss3_3.98-0ubuntu0.22.04.2_amd64.deb’ saved [1346964/1346964]

vagrant@ubuntu2204:~/Downloads$ wget 
https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+files/libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb
--2024-04-11 15:59:00--  
https://launchpad.net/~ubuntu-security-proposed/+archive/ubuntu/ppa/+files/libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb
Resolving launchpad.net (launchpad.net)... 185.125.189.222, 185.125.189.223, 
2620:2d:4000:1009::f3, ...
Connecting to launchpad.net (launchpad.net)|185.125.189.222|:443... connected.
HTTP request sent, awaiting response... 303 See Other
Location: 
https://launchpadlibrarian.net/724214469/libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb
 [following]
--2024-04-11 15:59:00--  
https://launchpadlibrarian.net/724214469/libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb
Resolving launchpadlibrarian.net (launchpadlibrarian.net)... 185.125.189.229, 
185.125.189.228, 2620:2d:4000:1009::13e, ...
Connecting to launchpadlibrarian.net 
(launchpadlibrarian.net)|185.125.189.229|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 570044 (557K) [application/x-debian-package]
Saving to: ‘libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb’

libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb
100%[====================================================================================================>]
556.68K  --.-KB/s    in 0.1s

2024-04-11 15:59:00 (4.98 MB/s) -
‘libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb’ saved [570044/570044]

vagrant@ubuntu2204:~/Downloads$ LC_ALL=C apt-cache policy libnss3 libnss3-tools
libnss3:
  Installed: 2:3.68.2-0ubuntu1
  Candidate: 2:3.98-0ubuntu0.22.04.1
  Version table:
     2:3.98-0ubuntu0.22.04.1 500
        500 https://mirrors.edge.kernel.org/ubuntu jammy-updates/main amd64 
Packages
        500 https://mirrors.edge.kernel.org/ubuntu jammy-security/main amd64 
Packages
 *** 2:3.68.2-0ubuntu1 500
        500 https://mirrors.edge.kernel.org/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status
libnss3-tools:
  Installed: 2:3.68.2-0ubuntu1
  Candidate: 2:3.98-0ubuntu0.22.04.1
  Version table:
     2:3.98-0ubuntu0.22.04.1 500
        500 https://mirrors.edge.kernel.org/ubuntu jammy-updates/universe amd64 
Packages
        500 https://mirrors.edge.kernel.org/ubuntu jammy-security/universe 
amd64 Packages
 *** 2:3.68.2-0ubuntu1 500
        500 https://mirrors.edge.kernel.org/ubuntu jammy/universe amd64 Packages
        100 /var/lib/dpkg/status
vagrant@ubuntu2204:~/Downloads$ LC_ALL=C sudo apt-mark unhold libnss3 
libnss3-tools
Canceled hold on libnss3.
Canceled hold on libnss3-tools.
vagrant@ubuntu2204:~/Downloads$ LC_ALL=C sudo apt install --yes ./libnss3
libnss3_3.98-0ubuntu0.22.04.2_amd64.deb        
libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb  
vagrant@ubuntu2204:~/Downloads$ LC_ALL=C sudo apt install --yes ./libnss3*.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libnss3' instead of './libnss3_3.98-0ubuntu0.22.04.2_amd64.deb'
Note, selecting 'libnss3-tools' instead of 
'./libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb'
The following additional packages will be installed:
  libnspr4
The following packages will be upgraded:
  libnspr4 libnss3 libnss3-tools
3 upgraded, 0 newly installed, 0 to remove and 156 not upgraded.
Need to get 119 kB/2036 kB of archives.
After this operation, 216 kB of additional disk space will be used.
Get:1 /home/vagrant/Downloads/libnss3_3.98-0ubuntu0.22.04.2_amd64.deb libnss3 
amd64 2:3.98-0ubuntu0.22.04.2 [1347 kB]
Get:2 /home/vagrant/Downloads/libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb 
libnss3-tools amd64 2:3.98-0ubuntu0.22.04.2 [570 kB]
Get:3 https://mirrors.edge.kernel.org/ubuntu jammy-updates/main amd64 libnspr4 
amd64 2:4.35-0ubuntu0.22.04.1 [119 kB]
Fetched 119 kB in 0s (850 kB/s)                            
(Reading database ... 225741 files and directories currently installed.)
Preparing to unpack .../libnspr4_2%3a4.35-0ubuntu0.22.04.1_amd64.deb ...
Unpacking libnspr4:amd64 (2:4.35-0ubuntu0.22.04.1) over (2:4.32-3build1) ...
Preparing to unpack .../libnss3_3.98-0ubuntu0.22.04.2_amd64.deb ...
Unpacking libnss3:amd64 (2:3.98-0ubuntu0.22.04.2) over (2:3.68.2-0ubuntu1) ...
Preparing to unpack .../libnss3-tools_3.98-0ubuntu0.22.04.2_amd64.deb ...
Unpacking libnss3-tools (2:3.98-0ubuntu0.22.04.2) over (2:3.68.2-0ubuntu1) ...
Setting up libnspr4:amd64 (2:4.35-0ubuntu0.22.04.1) ...
Setting up libnss3:amd64 (2:3.98-0ubuntu0.22.04.2) ...
Setting up libnss3-tools (2:3.98-0ubuntu0.22.04.2) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
Scanning processes...                                                           
                                                                                
                             
Scanning candidates...                                                          
                                                                                
                             
Scanning linux images...                                                        
                                                                                
                             

Running kernel seems to be up-to-date.

Restarting services...
 systemctl restart udisks2.service

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
N: Download is performed unsandboxed as root as file 
'/home/vagrant/Downloads/libnss3_3.98-0ubuntu0.22.04.2_amd64.deb' couldn't be 
accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
vagrant@ubuntu2204:~/Downloads$ cd ~/.pki/nssdb/
vagrant@ubuntu2204:~/.pki/nssdb$ cat pkcs11.txt 
library=
name=NSS Internal PKCS #11 Module
parameters=configdir='sql:/home/vagrant/.pki/nssdb' certPrefix='' keyPrefix='' 
secmod='secmod.db' flags=optimizeSpace updatedir='' updateCertPrefix='' 
updateKeyPrefix='' updateid='' updateTokenDescription='' 
NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 
slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512]
 askpw=any timeout=30})

library=/usr/lib/x86_64-linux-gnu/onepin-opensc-pkcs11.so
name=OpenSC smartcard framework

library=/usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so
name=PKCS #11 Trust Storage Module
NSS=trustOrder=100    

vagrant@ubuntu2204:~/.pki/nssdb$ modutil -dbdir . -delete "OpenSC smartcard 
framework" -force
Module "OpenSC smartcard framework" deleted from database.
vagrant@ubuntu2204:~/.pki/nssdb$ modutil -dbdir . -add "OpenSC smartcard 
framework" -libfile /usr/lib/x86_64-linux-gnu/onepin-opensc-pkcs11.so -force
Module "OpenSC smartcard framework" added to database.
vagrant@ubuntu2204:~/.pki/nssdb$ echo $?
0
vagrant@ubuntu2204:~/.pki/nssdb$ cat pkcs11.txt 
library=
name=NSS Internal PKCS #11 Module
parameters=configdir='sql:/home/vagrant/.pki/nssdb' certPrefix='' keyPrefix='' 
secmod='secmod.db' flags=optimizeSpace updatedir='' updateCertPrefix='' 
updateKeyPrefix='' updateid='' updateTokenDescription='' 
NSS=Flags=internal,critical trustOrder=75 cipherOrder=100 
slotParams=(1={slotFlags=[ECC,RSA,DSA,DH,RC2,RC4,DES,RANDOM,SHA1,MD5,MD2,SSL,TLS,AES,Camellia,SEED,SHA256,SHA512]
 askpw=any timeout=30})

library=/usr/lib/x86_64-linux-gnu/pkcs11/p11-kit-trust.so
name=PKCS #11 Trust Storage Module
NSS=trustOrder=100    

library=/usr/lib/x86_64-linux-gnu/onepin-opensc-pkcs11.so
name=OpenSC smartcard framework

vagrant@ubuntu2204:~/.pki/nssdb$ LC_ALL=C apt-cache policy libnss3 libnss3-tools
libnss3:
  Installed: 2:3.98-0ubuntu0.22.04.2
  Candidate: 2:3.98-0ubuntu0.22.04.2
  Version table:
 *** 2:3.98-0ubuntu0.22.04.2 100
        100 /var/lib/dpkg/status
     2:3.98-0ubuntu0.22.04.1 500
        500 https://mirrors.edge.kernel.org/ubuntu jammy-updates/main amd64 
Packages
        500 https://mirrors.edge.kernel.org/ubuntu jammy-security/main amd64 
Packages
     2:3.68.2-0ubuntu1 500
        500 https://mirrors.edge.kernel.org/ubuntu jammy/main amd64 Packages
libnss3-tools:
  Installed: 2:3.98-0ubuntu0.22.04.2
  Candidate: 2:3.98-0ubuntu0.22.04.2
  Version table:
 *** 2:3.98-0ubuntu0.22.04.2 100
        100 /var/lib/dpkg/status
     2:3.98-0ubuntu0.22.04.1 500
        500 https://mirrors.edge.kernel.org/ubuntu jammy-updates/universe amd64 
Packages
        500 https://mirrors.edge.kernel.org/ubuntu jammy-security/universe 
amd64 Packages
     2:3.68.2-0ubuntu1 500
        500 https://mirrors.edge.kernel.org/ubuntu jammy/universe amd64 Packages
vagrant@ubuntu2204:~/.pki/nssdb$
``

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to nss in Ubuntu.
https://bugs.launchpad.net/bugs/2060906

Title:
  attempt to add opensc using modutil suddenly fails

Status in nss package in Ubuntu:
  Confirmed
Status in nss source package in Focal:
  In Progress
Status in nss source package in Jammy:
  In Progress

Bug description:
  The following command to add the OpenSC PKCS11 module for use in, eg,
  Chrome fails:

  modutil -dbdir sql:$HOME/.pki/nssdb -add "OpenSC" -libfile
  /usr/lib/opensc-pkcs11.so

  This has worked for me several times in the past, but today Chrome
  stopped detecting my smart card and when I tried to re-initialize
  ~/.pki/nssdb and re-add OpenSC using the command above, I received the
  following error:

  ERROR: Failed to add module "OpenSC". Probable cause : "Unknown code
  ___P 3".

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nss/+bug/2060906/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to