youpage

Friday, September 23, 2011

Generating keys using OpenSSL

I was trying to generate a self-signing private key and public certificate for use with secure AuthSub. I got the right link from Google and followed the steps to do so, until I bumped into the first error:
Subject does not start with '/'. problems making Certificate Request.
So, is not that easy as I thought.
I was using:
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -sha1 -subj '/C=RO/ST=youState/L=youCity/CN=www.youpage.ro' -keyout myrsakey.pem -out /tmp/myrsacert.pem
in Win7 cmd which is similar with the approach suggested by the Google link.
Where the problem are:
- the subject must be enclosed with double quotes.
- the path to the temp must be like: D:/temp/myrsacert.pem not something relative.
Alright I said, "the key is successfully generated, let's upload it" - another problem here: The Key was not accepted.
How I successfully generated my key and certificate.
I did just this: openssl req -x509 -nodes -days 365 -newkey rsa:1024 -sha1 -in D:/temp/myrsacert.pem and then follow the dialog and correctly fill what i thought are the important requests:
Organization Name (eg, company) [Internet Widgits Pty Ltd]:www.youpage.ro
Email Address []:cgarbacea@gmail.com


Job done, the key is accepted and now I am able to use secure tokens when communicating with a Google service.


No comments:

Post a Comment