Dec 22, 2013

Upgrade Fedora 19 -> Fedora 20 Heisenbug

Yersterday I attemtped to upgrade my Fedora 19 installation.

The usual way with fedup started fine.

fedup-cli --network 20 --reboot

The packages were downloaded and the reboot-entry in grub was installed.

After downloading several times and rebooting the update installation in the
rebooted system was not started. After every reboot the GNOME desktop
should be started.

Even disabling the desktop and removing the nvidia drivers didn't work.  I need them, because I use also an external monitor for extending the display.

After some attempts, I found an update instruction with yum here.

The instructions are:

# rpm --import https://fedoraproject.org/static/246110C1.txt
# yum update yum
# yum --releasever=20 distro-sync

After some hours and a reboot:
[ewer@lxewer ~]$ cat /etc/fedora-release
Fedora release 20 (Heisenbug)


The system with the new Fedora 20 ( Heisenbug) is up and running 

Dec 18, 2013

Fedora 19 - theme changing does not work

I worked since Fedora 17 on the same system by upgrading. Till last time
I had Fedora 19 and a problem with the harddisk. After a fresh installation
a lot of things were missing.

An other thing is changing the theme. After installing a lot of themes with
yum, they were not visible in gnome-tweak-tool. I found a hint here about
theming.

Using the dconf-editor and navigate to org.gnome.desktop.wm.preferences and the item theme, lets you set one of the themes found in /usr/share/themes.

After changing a theme, the look changes.

I currently use Clearlooks, because this theme changes the titlebar to blue,
if the window is active.

The other ( default-theme?) didn't make any huge visible change between the active and the other windows on the screen.

Dec 11, 2013

gpg2 import fails with " this may be caused by a missing self-signature"

I tried to import a public PGP-key into my GPG keyring, but this failed: 

gpg2 -v --import /tmp/publicKey.asc                    
Version: OpenPGP totemomail
gpg: armor header:
Comment: totemomail OpenPGP - http://www.totemo.com
gpg: armor header:
gpg: can't handle public key algorithm 3
gpg: can't handle public key algorithm 2
gpg: pub     0s/XXXXXXXXX 2013-07-15  User Name <user.name@exmaple.com>
gpg: key XXXXXXX: unsupported public key algorithm on user ID "User Name <user.name@example.com>"
gpg: key XXXXXXX: unsupported public key algorithm
gpg: key XXXXXXX: skipped user ID "User Name <user.name@example.com>"
gpg: key XXXXXXX:X skipped subkey
gpg: key XXXXXXXX: no valid user IDs
gpg: this may be caused by a missing self-signature
gpg: Total number processed: 1
gpg:           w/o user IDs: 1

There is an option for gpg to be inserted into gpg.conf to allow the import:

allow-non-selfsigned-uid 

After this, the import works and the key is available in the keyring.

Dec 8, 2013

PGP PGP/Mime EMail processing in Java

I have to problem to read emails from an IMAP-Server, where the emails are encrypted with PGP/GPG.

This toolset uses a public/private Keyset for encryption. Thunderbird with the Plugin Enigmail supports
the encryption/decryption of emails with S/Mime OR PGP/Mime encrypted email messages.

On my Fedora 19, the gpg2 command can be used to manage the GPG-Keys on the command line.

But my problem is using this feature in a service developed in Java.

There is an "old" project named javamail-crypto on sourceforge.net. After compiling the source with ant, the
cryptix is not necessary -> only the bouncycastle-pgp provider.

After using the source from here, I could decrypt messages, but the day after, new encrypted messages
couldn't be encrypted.

Here are the exceptions I got:

org.bouncycastle.openpgp.PGPException: Exception creating cipher
at org.bouncycastle.openpgp.operator.jcajce.OperatorHelper.createDataDecryptor(Unknown Source) at org.bouncycastle.openpgp.operator.jcajce.OperatorHelper.createDataDecryptor(Unknown Source)
at org.bouncycastle.openpgp.operator.jcajce.OperatorHelper.createDataDecryptor(Unknown Source)
org.bouncycastle.openpgp.operator.jcajce.JcePublicKeyDataDecryptorFactoryBuilder$2.createDataDecryptor(Unknown Source)
at org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.getDataStream(Unknown Source)
at org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.getDataStream(Unknown Source)
at org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.getDataStream(Unknown Source)
at org.bouncycastle.openpgp.PGPPublicKeyEncryptedData.getDataStream(Unknown Source)
at net.suberic.crypto.bouncycastlepgp.BCPGPProviderImpl.decrypt(BCPGPProviderImpl.java:106)
at net.suberic.crypto.PGPEncryptionUtils.decrypt(PGPEncryptionUtils.java:52)
at net.suberic.crypto.PGPEncryptionUtils.decryptMultipart(PGPEncryptionUtils.java:225)
at javamailtest.JavaMailTest.main(JavaMailTest.java:116)
Caused by: java.security.InvalidKeyException: Illegal key size
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
... 10 more
Exception in thread "main" java.security.GeneralSecurityException: Incorrectly formed message:  org.bouncycastle.openpgp.PGPException: Exception creating cipher
at net.suberic.crypto.bouncycastlepgp.BCPGPProviderImpl.decrypt(BCPGPProviderImpl.java:140)
at net.suberic.crypto.PGPEncryptionUtils.decrypt(PGPEncryptionUtils.java:52)
at net.suberic.crypto.PGPEncryptionUtils.decryptMultipart(PGPEncryptionUtils.java:225)
at javamailtest.JavaMailTest.main(JavaMailTest.java:116)
Java Result: 1

After long time of searching, I found a hint on the bouncycastle homepage, about a missing JCE files from the JDK to get the decryption to work again.

After downloading the JCE-Package from Oracle's JDK and installing, the decryption worked again.

Now I found, that the openJDK-Installation on Fedora 19 had no problems, but the JDK from Oracle with
the missing JCE.