jclouds/jclouds — pull request #1054 by nacx (2012-12-08 23:29:13+00:00)
Title: Fixed decoding of PKCS1 encoded public keys

The current `decode`method in the `PKCS1EncodedPublicKeySpec ` assumed that the input parameter was a private key, but it was called from the `Pems.publicKeySpec` when the key was in PKCS1 format, causing it to fail (there were no unit tests for that case).

This commit fixes this by manually decoding PKCS1 keys using Bouncycastle, to properly read the modulus and the public exponent.