0

I used this code

# Generate the RSA keys and certificate

openssl req -x509 -nodes -days 365 -newkey rsa:1024 -sha1 -subj \
  '/C=US/ST=CA/L=Mountain View/CN=www.example.com' -keyout \
  myrsakey.pem -out /tmp/myrsacert.pem

From here: http://code.google.com/apis/gdata/docs/auth/authsub.html#Registered

Google links to this from their own ManageDomains site. I have used the code, and uploaded the pem file to Google. When I test it, it gives me this error:

SyntaxError: Missing PEM Prefix

Can anyone point me in the right direction, I've wasted several hours on this. Thanks!

dldnh
  • 8,923
  • 3
  • 40
  • 52
Andy
  • 201
  • 1
  • 3
  • 10

1 Answers1

0

You have to send myrsacert.pem to Google, not myrsakey.pem !

The file has to contain:

-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----

source code:

start = s.find("-----BEGIN CERTIFICATE-----")
end = s.find("-----END CERTIFICATE-----")
if start == -1:
    raise SyntaxError("Missing PEM prefix")
stewe
  • 41,820
  • 13
  • 79
  • 75