PEMKeyPair pair = (PEMKeyPair) pemParser.readObject();
byte[] encodedPrivateKey = pair.getPrivateKeyInfo().getEncoded();
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
PKCS8EncodedKeySpec privateKeySpec = new PKCS8EncodedKeySpec(encodedPrivateKey);
PrivateKey privateKey = keyFactory.generatePrivate(privateKeySpec);
signatureService = new RSASha1SignatureService(privateKey);
} catch(IOException e) {
throw new IllegalStateException(e);
} catch(NoSuchAlgorithmException | InvalidKeySpecException e) {
throw new IllegalArgumentException(e);
}