I want to integrate jira into third party application using OAuth1.0.For this,I used public key value as SSL certificate value.I used the following code to generate RSA key,
private PrivateKey getPrivateKey(String privateKey) throws NoSuchAlgorithmException, InvalidKeySpecException {
byte[] privateBytes = Base64.decodeBase64(privateKey);
PKCS8EncodedKeySpec keySpec = new PKCS8EncodedKeySpec(privateBytes);
KeyFactory kf = KeyFactory.getInstance("RSA");
return kf.generatePrivate(keySpec);
}
but I get an error
java.security.InvalidKeyException: IOException : DER input, Integer tag error.
Could anyone help me to resolve this?