Heiner Westphal wrote: ...
(ever tried to RSA-sign with an DSA-pubkey?).
... Stop, no! I did not even try to sign anything using a pubkey (would be pretty pointless, anyone can, but only one could check the sig, hehe). But I tried to do an SHA-1/RSA signature using an DSA keypair, which did not work out :)
Now I use cert.getPublicKey().getAlgorithm() to find out, if using RSA or DSA is appropriate.