Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8607843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:27:41+00:00 2026-06-12T03:27:41+00:00

I have an issue with push notifications. I have a p.12 certificate that was

  • 0

I have an issue with push notifications. I have a p.12 certificate that was created by a team member and I have the device token for the device to be pushed to. I am using the javapns library to do the push (also tried the javaapns lib with same results) but I keep getting this error:

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:136)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1720)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:954)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:632)
at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59)
at java.io.OutputStream.write(OutputStream.java:58)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:402)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:350)
at javapns.notification.PushNotificationManager.sendNotification(PushNotificationManager.java:320)
at javapns.Push.sendPayload(Push.java:177)
at javapns.Push.combined(Push.java:100)
at PushTest.push(PushTest.java:43)
at PushTest.main(PushTest.java:25)

and this is the code I am using to test

try {
    List<PushedNotification> n = Push.combined(text, 20, null, file, "********", false, token);

    for (PushedNotification notification : n) {
        if (notification.isSuccessful())  
            System.out.println("Push notification sent successfully to: " + notification.getDevice().getToken());
        else {
            String invalidToken = notification.getDevice().getToken();

            Exception theProblem = notification.getException();
            theProblem.printStackTrace();

            ResponsePacket theErrorResponse = notification.getResponse();
            if (theErrorResponse != null)
                System.out.println(theErrorResponse.getMessage());
        }
    }
}
catch (CommunicationException e)  {
    // TODO Auto-generated catch block
    e.printStackTrace();
}
catch (KeystoreException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
}

I read and tried the suggestions from several of the other posts including importing the certificate into cacerts keystore but the import fails as well. I am developing using eclipse on a windows machine.

Anyone familiar with this issue? I am new to using ssl so perhaps I’m doing something wrong or is it that I cannot use a certificate generated on another machine?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:27:42+00:00Added an answer on June 12, 2026 at 3:27 am

    I am a new iOS developer and I had the same issue before.

    I finally found that the problem was due to the p12 certificate.
    We should not use the private key p12 file, instead we should generate a p12 from your private key and the cert download from Apple.

    Please execute the following OpenSSL command to get the correct p12 file:

    developer_identity.cer <= download from Apple
    mykey.p12 <= Your private key
    
    openssl x509 -in developer_identity.cer -inform DER -out developer_identity.pem -outform PEM
    openssl pkcs12 -nocerts -in mykey.p12 -out mykey.pem
    openssl pkcs12 -export -inkey mykey.pem -in developer_identity.pem -out iphone_dev.p12
    

    After that, you should use iphone_dev.p12 to communicate with apple server.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an app which using APNS. I have got the push notifications
I have a strange issue. I'm trying to get Apple Push Notifications working with
I am working on Push Notifications in Android. Now the issue is that I
I have an app that used to accept push notifications without any issues but
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So
I have been using https://github.com/Redth/APNS-Sharp to send push notification message to all devices where
im new with mongo and so far have no issue using it. Until i
I have a page that notifies the user about server updates, using window.webkitNotifications .
I have this issue, that I have to put this in every time I
I have an issue with my program using much more memory than I think

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.