I have tried to create a public key in two ways,
I created Self Signed Certificate and export it to .pfx file and used Openssl to get temp.cer file which contains the public key
used openssl to generate a public key as follows.
openssl genrsa -out myjira.pem 1024 openssl rsa -in temp.pem -pubout -out temp.pub
I am using an application and trying to implement OAuth on it. when I enter the public key from temp.cer (which is longer) it does not accepts it and says Must be a valid public key. java.security.InvalidKeyException:. But when I enter the public key from temp.pub (which is much shorter than the other one) it accepts it. now my question is what is differences between those public keys?