Jump to content

You're browsing the 2004-2023 VATSIM Forums archive. All content is preserved in a read-only fashion.
For the latest forum posts, please visit https://forum.vatsim.net.

Need to find something? Use the Google search below.
PLEASE READ - Webmaster Support Forum
This forum will be retired in the near future. Please direct all queries to our dedicated GitHub support page https://github.com/vatsimnetwork/developer-info/discussions 
Here you can find documentation on our services and we are continuing to migrate pertinent information into the Wiki pages https://github.com/vatsimnetwork/developer-info/wiki

RSA-SHA1 Public key error


Raihan Shahzad 1208205
 Share

Recommended Posts

Raihan Shahzad 1208205
Posted
Posted

Hi,

 

i have been facing an error for SSO while saving Public key to Authentication Method RSA-SHA1, error is

 

Your public key was invalid

 

Not much expert in this type of stuff before, however i have generated the private & public RSA-SHA1 keys using OpenSSL with following commands:

 

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -sha1 -subj '/C=KW/ST=Kuwait/L=Hawalli/CN=www.vatwa.net' -keyout vatwaprivate.pem -out vatwacert.pem
openssl rsa -in vatwaprivate.pem -outform PEM -pubout -out vatwapublicnew.pem

 

Any help will be appreciated.

Raihan Shahzad

Network Supervisor | Team3

VATWA1 - Division Director West Asia

www.vatwa.net

0

Link to comment
Share on other sites

Johan Tiesinga
Posted
Posted

Hi,

 

What you've generated with those commands are Certificates which use RSA as their keys. What you need is just a plain RSA key pair. You can find the commands to generate those at the bottom of this post: https://forums.vatsim.net/viewtopic.php?f=134&t=65339

 

Kind regards,

Johan.

Link to comment
Share on other sites

Raihan Shahzad 1208205
Posted
Posted

Thank you Johan, generated the keys with the commands described

 

openssl genrsa -out keyname.pem 2048

 

and slightly modified command to extract public key

 

openssl rsa -in keyname.pem -pubout -out keyname.pub

 

Error remain same while saving the Public key for RSA-SHA1 Authentication method

 

Your public key was invalid

Raihan Shahzad

Network Supervisor | Team3

VATWA1 - Division Director West Asia

www.vatwa.net

0

Link to comment
Share on other sites

Neil Farrington
Posted
Posted

Hi Raihan,

 

Are you copying the key with the '-----BEGIN PUBLIC KEY-----' and '-----END PUBLIC KEY-----' sections? You should make sure you include these parts when saving the key.

Neil Farrington

VATSIM UK

Link to comment
Share on other sites

Raihan Shahzad 1208205
Posted
Posted

Hi Neil,

 

No, i am not copying these while saving, do i need to?

 

-----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY-----

Raihan Shahzad

Network Supervisor | Team3

VATWA1 - Division Director West Asia

www.vatwa.net

0

Link to comment
Share on other sites

Raihan Shahzad 1208205
Posted
Posted

Update, public key saved

 

Thanks Neil for help

Raihan Shahzad

Network Supervisor | Team3

VATWA1 - Division Director West Asia

www.vatwa.net

0

Link to comment
Share on other sites

 Share