← Back to team overview

openjdk team mailing list archive

Bug#540490: Missleading error message

 

Hello,

I was a bit confused about this error message:

$aptitude install ... ca-certificates-java ... 
> [..]
> Setting up ca-certificates-java (20090629) ...
> creating /etc/ssl/certs/java/cacerts...
> [..]
>   removed untrusted certificate cacert.org/class3.crt
>   removed untrusted certificate cacert.org/root.crt
>   added certificate mozilla/Equifax_Secure_Global_eBusiness_CA.crt
>   removed untrusted certificate quovadis.bm/QuoVadis_Root_Certification_Authority.crt
>   ignored import, signature not available: mozilla/COMODO_ECC_Certification_Authority.crt
> keytool error: java.security.NoSuchAlgorithmException: SHA384withECDSA Signature not available

I think that the "error" would be very much easier to understand if the
"keytool error" was above "ignore import", or if the log message was
idented, like:


>   removed untrusted certificate quovadis.bm/QuoVadis_Root_Certification_Authority.crt
> keytool error: java.security.NoSuchAlgorithmException: SHA384withECDSA Signature not available
>   ignored import, signature not available: mozilla/COMODO_ECC_Certification_Authority.crt

or like:
>   removed untrusted certificate quovadis.bm/QuoVadis_Root_Certification_Authority.crt
>   ignored import, signature not available: mozilla/COMODO_ECC_Certification_Authority.crt
>   -> keytool error: java.security.NoSuchAlgorithmException: SHA384withECDSA Signature not available

See the sample patch below (not actually tested;)

Thanks,

Franklin
--- ca-certificates-java.postinst.orig	2009-10-04 12:46:17.000000000 +0200
+++ ca-certificates-java.postinst	2009-10-04 12:56:46.000000000 +0200
@@ -63,7 +63,7 @@
 		      echo "  added certificate $pem"
 		  elif grep -q 'Signature not available' $log; then
 		      echo "  ignored import, signature not available: ${line#+*}"
-		      cat $log
+		      sed -e 's/^/   -> /' $log
 		  else
 		      echo >&2 "  error adding ${line#+*}"
 		      errors=$(expr $errors + 1)
--- ca-certificates-java.postinst.orig	2009-10-04 12:46:17.000000000 +0200
+++ ca-certificates-java.postinst	2009-10-04 12:46:22.000000000 +0200
@@ -62,8 +62,8 @@
 		  then
 		      echo "  added certificate $pem"
 		  elif grep -q 'Signature not available' $log; then
+		      cat $log
 		      echo "  ignored import, signature not available: ${line#+*}"
-		      cat $log
 		  else
 		      echo >&2 "  error adding ${line#+*}"
 		      errors=$(expr $errors + 1)