Errors removing CAs that don’t exist, or adding ones that do

Bug #244412 reported by Anders Kaseorg
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ca-certificates-java (Debian)
Fix Released
Unknown
ca-certificates-java (Ubuntu)
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: ca-certificates-java

Running ‘sudo dpkg-reconfigure ca-certificates’ and deleting a certificate gives me this error:

Running hooks in /etc/ca-certificates/update.d....keytool error: java.lang.Exception: Alias <brasil_gov_br_pem> does not exist

Adding it back gives me this error:

Running hooks in /etc/ca-certificates/update.d....Certificate already exists in keystore under alias <brasil_gov_br>
Do you still want to add it? [no]: keytool error: java.lang.IllegalArgumentException

Furthermore, because the jks-keystore hook begins with ‘set -e’, if there is an error on the first certificate, all the later changes in the same run are ignored.

Revision history for this message
Anders Kaseorg (andersk) wrote :

Actually, I also get an error adding any certificate, even if it doesn’t already exist.

Running hooks in /etc/ca-certificates/update.d....Owner: OU=MIT Certification Authority, O=Massachusetts Institute of Technology, ST=Massachusetts, C=US
Issuer: OU=MIT Certification Authority, O=Massachusetts Institute of Technology, ST=Massachusetts, C=US
…blah blah blah…
Trust this certificate? [no]: keytool error: java.lang.IllegalArgumentException

I think the -trustcacerts and/or -noprompt options need to be passed to keytool to fix this.

Changed in ca-certificates-java:
status: Unknown → New
Revision history for this message
Anders Kaseorg (andersk) wrote :

This still happens with 20080514~ubuntu2.

# dpkg --force-depends --purge ca-certificates-java
# dpkg -i ca-certificates-java_20080514~ubuntu2_all.deb
# grep brasil /etc/ca-certificates.conf
brasil.gov.br/brasil.gov.br.crt
# sed -i '/brasil/ s/^/!/' /etc/ca-certificates.conf
# update-ca-certificates
Updating certificates in /etc/ssl/certs....done.
Running hooks in /etc/ca-certificates/update.d....keytool error: java.lang.Exception: Alias <brasil_gov_br_pem> does not exist
# sed -i '/brasil/ s/^!//' /etc/ca-certificates.conf
# update-ca-certificates
Updating certificates in /etc/ssl/certs....done.
Running hooks in /etc/ca-certificates/update.d....Certificate already exists in keystore under alias <brasil_gov_br>
Do you still want to add it? [no]: keytool error: java.lang.IllegalArgumentException

Anders Kaseorg (andersk)
Changed in ca-certificates-java:
status: New → Confirmed
Matthias Klose (doko)
Changed in ca-certificates-java:
status: Confirmed → In Progress
Revision history for this message
tdflanders (thomasdelbeke) wrote :

Hi there,

I got this debugging report in another way, but it describes the curl error and pins down a program line, so please have a look at it.

I got this by running '$ sudo dpkg-reconfigure -ap low' and debugging it by attaching the 'pidof' dpkg-reconfigur.

Cheers,

Thomas

Please take a look if the following bugs are duplicates:

Bug #285623
Bug #244412
Bug #285072

Revision history for this message
tdflanders (thomasdelbeke) wrote :
Revision history for this message
tdflanders (thomasdelbeke) wrote :
Download full text (12.7 KiB)

bzr 1.6.1 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', '-Dhpss', 'get', 'bzr+ssh://<email address hidden>/~openjdk/openjdk/openjdk6']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_IE.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.6.0]
  dbus /usr/lib/python2.5/site-packages/bzrlib/plugins/dbus [unknown]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3.0]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.13]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.
thomas@thomas-laptop:~$ sudo apt-get install openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless
[sudo] password for thomas:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  openjdk-6-jre-headless: Depends: ca-certificates-java (>= 20080712ubuntu1) but 20080712 is to be installed
E: Broken packages
thomas@thomas-laptop:~$ sudo apt-get -f install openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
  openjdk-6-jre-headless: Depends: ca-certificates-java (>= 20080712ubuntu1) but 20080712 is to be installed
E: Broken packages
thomas@thomas-laptop:~$ apt-get source ca-certificates-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
Need to get 4472B of source archives.
Get:1 http://archive.ubuntu.com intrepid/main ca-certificates-java 20080712ubuntu2 (dsc) [902B]
Get:2 http://archive.ubuntu.com intrepid/main ca-certificates-java 20080712ubuntu2 (tar) [3570B]
Fetched 4472B in 0s (5163B/s)
gpg: Signature made Fri 24 Oct 2008 11:56:07 BST using DSA key ID 0F932C9C
gpg: Can't check signature: public key not found
dpkg-source: extracting ca-certificates-java in ca-certificates-java-20080712ubuntu2
dpkg-source: info: unpacking ca-certificates-java_20080712ubuntu2.tar.gz
thomas@thomas-laptop:~$ sudo apt-get install ca-certificates-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
ca-certificates-java is already the newest version.
ca-certificates-java set to manually installed.
The followin...

Revision history for this message
tdflanders (thomasdelbeke) wrote :
Download full text (6.0 KiB)

Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
thomas@thomas-laptop:~$ sudo update-manager -c -d
thomas@thomas-laptop:~$ sudo synaptic
thomas@thomas-laptop:~$ apt-get source openjdk-6-jdk openjdk-6-jre openjdk-6-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
NOTICE: 'openjdk-6' packaging is maintained in the 'Bzr' version control system at:
bzr+ssh://<user>@bazaar.launchpad.net/~openjdk/openjdk/openjdk6
Please use:
bzr get bzr+ssh://<user>@bazaar.launchpad.net/~openjdk/openjdk/openjdk6
to retrieve the latest (possible unreleased) updates to the package.
NOTICE: 'openjdk-6' packaging is maintained in the 'Bzr' version control system at:
bzr+ssh://<user>@bazaar.launchpad.net/~openjdk/openjdk/openjdk6
Please use:
bzr get bzr+ssh://<user>@bazaar.launchpad.net/~openjdk/openjdk/openjdk6
to retrieve the latest (possible unreleased) updates to the package.
NOTICE: 'openjdk-6' packaging is maintained in the 'Bzr' version control system at:
bzr+ssh://<user>@bazaar.launchpad.net/~openjdk/openjdk/openjdk6
Please use:
bzr get bzr+ssh://<user>@bazaar.launchpad.net/~openjdk/openjdk/openjdk6
to retrieve the latest (possible unreleased) updates to the package.
Need to get 54.6MB of source archives.
Get:1 http://archive.ubuntu.com intrepid/main openjdk-6 6b12-0ubuntu6 (dsc) [2225B]
Get:2 http://archive.ubuntu.com intrepid/main openjdk-6 6b12-0ubuntu6 (tar) [54.4MB]
Get:3 http://archive.ubuntu.com intrepid/main openjdk-6 6b12-0ubuntu6 (diff) [185kB]
Fetched 54.6MB in 11min33s (78.7kB/s)
gpg: Signature made Sat 25 Oct 2008 00:13:55 BST using DSA key ID 0F932C9C
gpg: Can't check signature: public key not found
dpkg-source: extracting openjdk-6 in openjdk-6-6b12
dpkg-source: info: unpacking openjdk-6_6b12.orig.tar.gz
dpkg-source: info: applying openjdk-6_6b12-0ubuntu6.diff.gz
Skipping unpack of already unpacked source in openjdk-6-6b12
Skipping unpack of already unpacked source in openjdk-6-6b12
thomas@thomas-laptop:~$ bzr get bzr+ssh://<user>@bazaar.launchpad.net/~openjdk/openjdk/openjdk6
bash: user: No such file or directory
thomas@thomas-laptop:~$ bzr get bzr+ssh://<email address hidden>/~openjdk/openjdk/openjdk6
The authenticity of host 'bazaar.launchpad.net (91.189.90.11)' can't be established.
RSA key fingerprint is 9d:38:3a:63:b1:d5:6f:c4:44:67:53:49:2e:ee:fc:89.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': yes
Warning: Permanently added 'bazaar.launchpad.net,91.189.90.11' (RSA) to the list of known hosts.
Permission denied (publickey).
bzr: ERROR: Connection closed: please check connectivity and permissions (and try -Dhpss if further diagnosis is required)
thomas@thomas-laptop:~$ bzr -Dhpss get bzr+ssh://<email address hidden>/~openjdk/openjdk/openjdk6
Permission denied (publickey).
bzr: ERROR: exceptions.AttributeError: 'ProtocolThreeDecoder' object has no attribute '_in_buffer'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/...

Read more...

Revision history for this message
Matthias Klose (doko) wrote :

fixed in ca-certificates-java_20080712ubuntu3

Changed in ca-certificates-java:
status: In Progress → Fix Released
Changed in ca-certificates-java:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.