hengsokchamroeun / javapns

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

Invalid certificate chain (Received fatal alert: certificate_unknown) #107

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, 
I'm new to javapns. I got the below exception when tried to access the code. I 
searched in the forum but couldnt get any useful tip to find out the reason.
ERROR javapns.notification.PushNotificationManager  - Delivery error
: javapns.communication.exceptions.InvalidCertificateChainException: Invalid cer
tificate chain (Received fatal alert: certificate_unknown)!  Verify that the key
store you provided was produced according to specs...
This is the code i used to check the javapns.
public static void main(String[] args) {
try{
PushedNotifications notification = Push.alert("DNBiMobileAlert!", 
"D:/myfile.p12", "mypassword", 
            false,"267ad2c53cae5d3e8dcb55fbb9b5e95f60f171c179d6131821fb9df29df55e0f");
System.out.println("Here :" + notification.isEmpty());
System.out.println("Response is:" + notification.toString());
}catch(Exception exp){
System.out.println("Exception Occurred" + exp.getMessage());
}
}

Original issue reported on code.google.com by send2tes...@gmail.com on 13 Feb 2012 at 4:40

GoogleCodeExporter commented 8 years ago
The exception is pretty self-explanatory...  did you produce the keystore 
following precisely the procedure described in the documentation?  
(http://code.google.com/p/javapns/wiki/PreparingCertificates)

Original comment by sype...@gmail.com on 13 Feb 2012 at 5:09

GoogleCodeExporter commented 8 years ago
Is this issue resolved?  May we close it?

Original comment by sype...@gmail.com on 19 Feb 2012 at 5:40

GoogleCodeExporter commented 8 years ago
Closing for lack of feedback from original poster, and because the issue is 
most likely caused by a certificate chain not generated properly by user.

Original comment by sype...@gmail.com on 21 Feb 2012 at 3:39

GoogleCodeExporter commented 8 years ago
Invalid certificate chain (Received fatal alert: certificate_unknown)  i am 
getting same error, any luck, any one got solution for this

Original comment by amitsing...@gmail.com on 20 Apr 2013 at 3:38

GoogleCodeExporter commented 8 years ago
I solved the issue in jdk 1.7 and using p12 after changing the passwd length of 
p12 file 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:31