Skip to content
This repository has been archived by the owner on Mar 9, 2018. It is now read-only.

Validation failed: Certificate Certificate value must contain a certificate and a private key #176

Closed
zanderisrael opened this issue Oct 19, 2013 · 6 comments

Comments

@zanderisrael
Copy link

After following the steps:

app = Rapns::Apns::App.new
app.name = "ios_app"
app.certificate = File.read("/path/to/sandbox.pem")
app.environment = "sandbox" # APNs environment.
app.password = "certificate password"
app.connections = 1
app.save!

  • After assinging the pem file , it prints it out in the console. (its 100% valid, copied from a working project).

But when saving i get this error:
'
"Validation failed: Certificate Certificate value must contain a certificate and a private key"

Any ideas ?

@zanderisrael
Copy link
Author

problem fixed, it was the ruby version i guess

@carlosIntegradevs
Copy link

I have the same error. I'm using Ruby 1.9.3

@zanderisrael
Copy link
Author

Problem was the ruby version.
try 2.0.

@carlosIntegradevs
Copy link

Ok, thanks.

@humbroll
Copy link

humbroll commented Jan 6, 2014

I have the same error.
I'm using ruby 2.0.0p195.

any solution ?

@mattconnolly
Copy link
Contributor

This error occurs when the certificate and private key cannot be read from the certificate .pem data. Typically this is because of a bad certificate, but it may also occur if your ruby doesn't have the OpenSSL libraries available.

Can you please check if you can access OpenSSL in your ruby installation?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants