This repository has been archived by the owner. 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

Projects
None yet
4 participants
@zanderisrael

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

This comment has been minimized.

Show comment Hide comment
@zanderisrael

zanderisrael Oct 21, 2013

problem fixed, it was the ruby version i guess

problem fixed, it was the ruby version i guess

@carlosIntegradevs

This comment has been minimized.

Show comment Hide comment
@carlosIntegradevs

carlosIntegradevs Nov 21, 2013

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

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

@zanderisrael

This comment has been minimized.

Show comment Hide comment
@zanderisrael

zanderisrael Nov 21, 2013

Problem was the ruby version.
try 2.0.

Problem was the ruby version.
try 2.0.

@carlosIntegradevs

This comment has been minimized.

Show comment Hide comment
@carlosIntegradevs

carlosIntegradevs Nov 21, 2013

Ok, thanks.

Ok, thanks.

@humbroll

This comment has been minimized.

Show comment Hide comment
@humbroll

humbroll Jan 6, 2014

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

any solution ?

humbroll commented Jan 6, 2014

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

any solution ?

@mattconnolly

This comment has been minimized.

Show comment Hide comment
@mattconnolly

mattconnolly Jan 6, 2014

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?

Contributor

mattconnolly commented Jan 6, 2014

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.