simonyuau / javapns

Automatically exported from code.google.com/p/javapns
0 stars 0 forks source link

certificate_unknown #122

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I keep getting certificate_unknown error.

I have followed the proper steps to generate .p12 file

please help.

Original issue reported on code.google.com by rasika.t...@gmail.com on 6 May 2012 at 6:50

GoogleCodeExporter commented 9 years ago
rere is the error

4786 [main] ERROR javapns.notification.PushNotificationManager  - Delivery 
error: javapns.communication.exceptions.InvalidCertificateChainException: 
Invalid certificate chain (Received fatal alert: certificate_unknown)!  Verify 
that the keystore you provided was produced according to specs...

Original comment by rasika.t...@gmail.com on 6 May 2012 at 6:51

GoogleCodeExporter commented 9 years ago
The error is accurate...  Something must have gone wrong or have been 
overlooked in the process of producing your keystore, sorry..

Original comment by sype...@gmail.com on 7 May 2012 at 1:30

GoogleCodeExporter commented 9 years ago
Even I am facing the same issue. I got the same error. But when i use the same 
certificate with PHP code, It works.

Please guide to resolve that.

Original comment by sumitkuk...@gmail.com on 11 May 2012 at 12:10

GoogleCodeExporter commented 9 years ago
I am facing the same issue too. 
The same certificate that worked before, now doesn't work anymore. 
Is it possible that, if I have updated my developer certificate(adding two 
devices), I need to regenerate the push certificate? Or this is not related to 
this issue?
Maybe because Javapns use a private key (.p12) instead of .pem format?

(I'm new to Apple world so maybe I'm saying wrong things)

Thanks 

Original comment by gabriele...@gmail.com on 15 May 2012 at 4:05

GoogleCodeExporter commented 9 years ago
Yes, modifying your developer certificate without updating it for APNS would be 
the likely cause of your problem.  Everything needs to be up-to-date and in 
sync...

Original comment by sype...@gmail.com on 15 May 2012 at 5:27

GoogleCodeExporter commented 9 years ago
sorry I'm korean. I Can Not English.

-"certificate_unknown" Error is jdk ver.1.7?!
https://github.com/notnoop/java-apns/issues/54 

jdk 1.6 is Ok
jdk 1.7 is No    
 it is true?

im test -> true.... wath? 

Original comment by nulldspo...@gmail.com on 16 May 2012 at 2:05

GoogleCodeExporter commented 9 years ago
java-apns is NOT JavaPNS... please use their site if you want support for their 
project.

Original comment by sype...@gmail.com on 17 May 2012 at 8:49

GoogleCodeExporter commented 9 years ago
Closing, since no further feedback was received after relevant tips were given, 
and also since the last submitter was not even using this project.

Original comment by sype...@gmail.com on 2 Jul 2012 at 9:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi
I am getting same error i.e Delivery error: 
javapns.communication.exceptions.InvalidCertificateChainException: Invalid 
certificate chain (Received fatal alert: certificate_unknown)!  Verify that the 
keystore you provided was produced according to specs..

while same certificate.p12 is running on php but not with java APNS.I made a 
new certificates but its giving same issues again.Please solve this issues as 
soon as possible.

Thanks in advance!!

Original comment by vermasac...@gmail.com on 12 Jul 2012 at 2:36

GoogleCodeExporter commented 9 years ago
To generate your keystore for JavaPNS, have you precisely followed the 
procedure described in the wiki?

Are you connecting to the same server your certificate was generated for?

Which version of the Java runtime are you using?  Have you tried with other 
runtimes?

Although the exception you see is from JavaPNS, it actually wraps an exception 
from Java Security (certificate unknown), which JavaPNS has no control of. 

Original comment by sype...@gmail.com on 12 Jul 2012 at 2:54

GoogleCodeExporter commented 9 years ago
Hi,
i followed the wiki procees and making certificates.p12 for apple.I am using 
jdk 1.6 and tried with other versions 1.5 and 1.7 but its syntax error due to 
some api i have used in my webservice.
this is my code which is throwing exception
Push.alert("Hello", "C:/Temp/Certificates.p12", "Moneyteam1579", false, 
receiver_user.getUdId()); 
Delivery error: 
javapns.communication.exceptions.InvalidCertificateChainException: Invalid 
certificate chain

Original comment by vermasac...@gmail.com on 13 Jul 2012 at 5:27

GoogleCodeExporter commented 9 years ago
Was your certificate created for the PRODUCTION service?

What does your keystore contain exactly?  One certificate and one key?  or more?

Original comment by sype...@gmail.com on 13 Jul 2012 at 2:00

GoogleCodeExporter commented 9 years ago
no my certificate created for development and .p12 contains one certificate and 
one key

Original comment by vermasac...@gmail.com on 14 Jul 2012 at 7:27

GoogleCodeExporter commented 9 years ago
if any one have solution about above problem please suggest me...

Original comment by vermasac...@gmail.com on 17 Jul 2012 at 8:13

GoogleCodeExporter commented 9 years ago
Hi,

I had the same issue, but after i followed steps specified at below link to 
generate my certificate, it is resolved. (Though i stuck with - 
SSLHandshakeException).

http://www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part
-12

Its purely the certificate related issue, you can verify your steps by going 
through the steps provided at the above link, (Its Screen shots so easy to 
verify).

Original comment by darshwit...@gmail.com on 17 Jul 2012 at 10:24

GoogleCodeExporter commented 9 years ago
I had the same problem and resolved it by changing JVM from OpenJDK 1.7 to 
OpenJDK 1.6 in my case. FYI.

Original comment by despe...@gmail.com on 14 May 2013 at 6:23

GoogleCodeExporter commented 9 years ago
I solved the issue. In jdk 1.7 and using p12, javapns works well only when the 
passwd length of p12 file must be greater than or equal 6. otherwise, the 
following error happens:
[[1] not transmitted to token 595d8..725bf  
javapns.communication.exceptions.InvalidCertificateChainException: Invalid 
certificate chain (Received fatal alert: certificate_unknown)!  Verify that the 
keystore you provided was produced according to specs...]

Original comment by xinqian...@gmail.com on 18 Jan 2014 at 5:28

GoogleCodeExporter commented 9 years ago
I also resolved this by changing from OpenJDK 7 to OpenJDK 6 on Ubuntu 13.10. 
This is mentioned in the requirements section of the documentation but is not 
an obvious solution to an error that points you at the certificates.

Original comment by oaksyste...@gmail.com on 1 Apr 2014 at 11:14

GoogleCodeExporter commented 9 years ago
Please add  jssecacerts file to our $JAVA_HOME/lib/security/jssecacerts. It 
will solve the issue. Download from this link: 
https://github.com/notnoop/java-apns/wiki

Original comment by mahende...@bahwaniton.com on 28 Dec 2014 at 6:06