When trying to send a message I get the following error, I did follow the instructions on how to create the certificate but it looks like it's not working. Do you have any suggestions as to what might be wrong.

Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure in push_notifications_open_apns() (line 342 of /sites/all/modules/push_notifications/push_notifications.module).
Warning: stream_socket_client(): Failed to enable crypto in push_notifications_open_apns() (line 342 of /sites/all/modules/push_notifications/push_notifications.module).
Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Unknown error) in push_notifications_open_apns() (line 342 of /sites/all/modules/push_notifications/push_notifications.module).
APNS connection could not be established. Check to make sure you are using a valid certificate file.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

haagendazs’s picture

Assigned: Unassigned » haagendazs

Hi there. I haven't had that problem yet, but some googling led me to believe that there is an issue with your certificate (the actual error means that your server could not open an ssl connection to Apple's servers).

A few questions:

  • Is the certificate located in the correct folder?
  • Did you name the certificate correctly?
marcus178’s picture

I have the following file in the certificates folder of the module

apns-development.pem

haagendazs’s picture

If you want to send me a quick email, I can take a look at your certificate to let you know if there are any obvious problems with it.

marcus178’s picture

email sent

haagendazs’s picture

Status: Active » Closed (cannot reproduce)

Marcus: I just wanted to sum up your findings. You find out that you had a problem with your server and your firewall, in particular you're getting a "connection refused" error on port 2195.

marcus178’s picture

I do have it working now but I'm not entirely sure what the problem was. I don't think it was firewall related, but when trying to work out what was wrong I decided to update my server as well and after doing that it started working.

webkenny’s picture

Status: Closed (cannot reproduce) » Active

I seem to be getting the same error...

Warning: stream_socket_client() [function.stream-socket-client]: SSL operation failed with code 1. OpenSSL Error messages: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure in push_notifications_open_apns() (line 320 of /Users/kennys/Sites/av/drupal/docroot/sites/all/modules/contrib/push_notifications/push_notifications.module).

Did we ever find a cause?

webkenny’s picture

I am finding evidence that they key file I have contains a passphrase but I'm not seeing any documentation for how this module handles that. Or does it?

webkenny’s picture

Status: Active » Closed (cannot reproduce)

Closing this. It doesn't support passphrases. One issue and patch, coming right up. :)

lolandese’s picture

Issue summary: View changes

You might give the 'Automatic override of drupal_http_request()' of https://www.drupal.org/project/chr a try. See if using another method solves anything.

gumdal’s picture

Priority: Normal » Critical
Status: Closed (cannot reproduce) » Active

Seems that I still face the error, Push Notifications module report the following error:
"APNS connection could not be established. Check to make sure you are using a valid certificate file."

I found out this from the logs:
"Connection to Apple Notification Server failed."

Did the following to check for cause of the issue:
I double checked if my APNS certificate is valid by checking in Apple portal, it clearly states that the certificates are valid till May 15, 2015.
Next, I checked by connecting to SSL and see if I am able to communicate successfully - results are positive.

SSL connection code:

[ec2-user@ip-172-31-xx-xx certificates]$ openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert apns-development-4f7ac4a51d.pem
Enter pass phrase for apns-development-4f7ac4a51d.pem:

Following is the response:

CONNECTED(00000003)
depth=2 O = Entrust.net, OU = www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), OU = (c) 1999 Entrust.net Limited, CN = Entrust.net Certification Authority (2048)
verify return:1
depth=1 C = US, O = "Entrust, Inc.", OU = www.entrust.net/rpa is incorporated by reference, OU = "(c) 2009 Entrust, Inc.", CN = Entrust Certification Authority - L1C
verify return:1
depth=0 C = US, ST = California, L = Cupertino, O = Apple Inc., CN = gateway.sandbox.push.apple.com
verify return:1
---
Certificate chain
 0 s:/C=US/ST=California/L=Cupertino/O=Apple Inc./CN=gateway.sandbox.push.apple.com
   i:/C=US/O=Entrust, Inc./OU=www.entrust.net/rpa is incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Certification Authority - L1C
 1 s:/C=US/O=Entrust, Inc./OU=www.entrust.net/rpa is incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Certification Authority - L1C
   i:/O=Entrust.net/OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.)/OU=(c) 1999 Entrust.net Limited/CN=Entrust.net Certification Authority (2048)
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIFMzCCBBugAwIBAgIETCMmsDANBgkqhkiG9w0BAQUFADCBsTELMAkGA1UEBhMC
VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0
Lm5ldC9ycGEgaXMgaW5jb3Jwb3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMW
KGMpIDIwMDkgRW50cnVzdCwgSW5jLjEuMCwGA1UEAxMlRW50cnVzdCBDZXJ0aWZp
Y2F0aW9uIEF1dGhvcml0eSAtIEwxQzAeFw0xNDA1MjMxNzQyNDJaFw0xNjA1MjQw
NzA1MTNaMHQxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRIwEAYD
VQQHEwlDdXBlcnRpbm8xEzARBgNVBAoTCkFwcGxlIEluYy4xJzAlBgNVBAMTHmdh
dGV3YXkuc2FuZGJveC5wdXNoLmFwcGxlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBAOQpUlXpU3+LJ2XR01QdVooN7S9OFOINp3/tomPaenQAwFGo
qIakKFcN7AotWLFXFcR0QXKJkn4PL/zPKDBucyRFkc79S5+ZraGRISWfi7G8XeaG
G3GzgeVQ977Qrn0IdCswnbwLsJoErnmq4AveQajUbYueR9SxhkWBwMimSxXzXoOS
XUOPzRvzObCxVZrvBBDSRJCeNVnVxtCmb17DM3+z5GZatBwWnvw0jgvSQsgof+uC
idXgqcN4msv3tVH54ipmuD9kbbwvtnDCHBZRXMMmhUfFXZRuE8GBEbPfVkqB16ad
JV4TVrVxwFENwdnsX9CXavHCgFJhtHRWKOoCH48CAwEAAaOCAY0wggGJMAsGA1Ud
DwQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwMwYDVR0fBCww
.
.
.
.
.
d3d3LmVudHJ1c3QubmV0L3JwYTAIBgZngQwBAgIwKQYDVR0RBCIwIIIeZ2F0ZXdh
eS5zYW5kYm94LnB1c2guYXBwbGUuY29tMB8GA1UdIwQYMBaAFB7xq4kG+EkPATN3
7hR67hl8kyhNMB0GA1UdDgQWBBSSGfpGPmr9+FPcqRiStH0iKRBL7DAJBgNVHRME
AjAAMA0GCSqGSIb3DQEBBQUAA4IBAQAkj6+okMFVl7NHqQoii4e4iPDFiia+LmHX
BCc+2UEOOjilYWYoZ61oeqRXQ2b4Um3dT/LPmzMkKmgEt9epKNBLA6lSkL+IzEnF
wLQCHkL3BgvV20n5D8syzREV+8RKmSqiYmrF8dFq8cDcstu2joEKd173EfrymWW1
fMeaYTbjrn+vNkgM94+M4c/JnIDOhiPPbeAx9TESQZH+/6S98hrbuPIIlmaOJsOT
GMOUWeOTHXTCfGb1EM4SPVcyCW28TlWUBl8miqnsEO8g95jZZ25wFANlVxhfxBnP
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=Cupertino/O=Apple Inc./CN=gateway.sandbox.push.apple.com
issuer=/C=US/O=Entrust, Inc./OU=www.entrust.net/rpa is incorporated by reference/OU=(c) 2009 Entrust, Inc./CN=Entrust Certification Authority - L1C
---
No client certificate CA names sent
---
SSL handshake has read 4374 bytes and written 2284 bytes
---
New, TLSv1/SSLv3, Cipher is AES256-SHA
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : AES256-SHA
    Session-ID: F4104AC2A47717C9AF3CEA628604E9925D2529F15ACF68D466AC24556669CCD5
    Session-ID-ctx: 
    Master-Key: AE966F8B3C977EBEBBB77E6D6F5E56527BFDF1F3AB5AD18960DA8F0A34B3AB088D5EE2114C6F78D6B9B7DB7F7EDCA77C
    Key-Arg   : None
    Krb5 Principal: None
    PSK identity: None
    PSK identity hint: None
    TLS session ticket:
    0000 - be 90 6c 52 a1 fe f7 cb-34 a1 a6 a8 3a 7f 83 fa   ..lR....4...:...
    0010 - 5b 14 4f de 1d 0a cc 4e-a7 cd 57 a9 20 70 d6 a3   [.O....N..W. p..
    0020 - 69 05 a5 70 a2 d8 d4 32-07 3a 58 66 2d a2 91 7c   i..p...2.:Xf-..|
    0030 - d3 8a 8b 97 5c 8a 77 c9-5d 2e b2 d4 28 c2 ae 0c   ....\.w.]...(...
    0040 - 54 ba db 79 68 4b 84 d8-04 6a c0 e1 52 0f b4 84   T..yhK...j..R...
    0050 - 14 a3 51 54 4b 7a a4 46-69 89 c6 df ec a5 6a e7   ..QTKz.Fi.....j.
    0060 - a5 a8 79 fa a0 88 82 d1-20 17 ec 42 d0 12 2f 19   ..y..... ..B../.
    0070 - fe 95 4e d2 1a 5c ed d8-5b 09 c7 15 0c 99 0e 74   ..N..\..[......t
    0080 - 58 6e 3b 61 c0 fb 99 4e-6b b2 41 d3 01 15 7c f7   Xn;a...Nk.A...|.
    0090 - a9 f0 5f ad f6 dc d2 94-bb d9 ba 7b 99 1a c3 7b   .._........{...{
    00a0 - 6a 7c 45 12 7b 3e a6 86-2f 21 a3 99 77 df ad 83   j|E.{>../!..w...
    00b0 - d4 12 ba 60 4c 35 38 5a-95 07 ee 8a 2c e4 e5 4d   ...`L58Z....,..M
    00c0 - 93 93 97 bc ae e6 e4 b9-b0 9a 10 8d b4 0b 4a 88   ..............J.
    00d0 - e7 f4 97 b6 36 20 0c 2a-05 ed 59 49 1f be 55 01   ....6 .*..YI..U.
    00e0 - 4f a8 28 e8 a0 72 f3 16-4f d7 9c 5b d0 8c e8 b1   O.(..r..O..[....
    00f0 - ad 30 3f df e4 d6 de d2-20 8b fd 4b 5a cc 48 f8   .0?..... ..KZ.H.
    0100 - ab 6c 25 51 af 73 78 67-79 9e 6b 0b aa e2 00 3b   .l%Q.sxgy.k....;
    0110 - 2f 11 66 ff 51 43 40 d7-e8 ce 01 ab c4 8a eb e8   /.f.QC@.........
    0120 - 2e c7 42 f8 1a 55 f3 d2-8b e1 88 43 67 0f bb 82   ..B..U.....Cg...
    0130 - 95 46 88 02 04 54 61 17-8f f0 b5 a4 b5 f4 ec e9   .F...Ta.........
    0140 - 93 b6 f6 60 f4 5a 9e 57-6f a3 31 07 f1 b6 42 a0   ...`.Z.Wo.1...B.
    0150 - fa 3f f0 01 a7 f2 77 06-20 82 75 d0 f8 ae ee d9   .?....w. .u.....
    0160 - 0b a9 4b bf 2d be 00 74-8f f3 61 53 d2 ae d4 69   ..K.-..t..aS...i
    0170 - 5d 7e 9e b2 3d f7 d5 78-8d e1 3f 9e 39 35 bb ec   ]~..=..x..?.95..
    0180 - 86 a1 c5 29 f0 11 56 f9-f4 4b a2 bd 95 08 94 14   ...)..V..K......
    0190 - 5b 35 ca f6 7a 25 7c 53-2a c4 e1 f9 60 8a e3 6c   [5..z%|S*...`..l
    01a0 - 7d 08 eb 63 a0 f7 7c dd-51 e3 0f 3b 68 a2 cd ed   }..c..|.Q..;h...
    01b0 - 8f f2 d7 83 6d 56 29 7d-b2 2b 04 0a 51 ae d5 bc   ....mV)}.+..Q...
    01c0 - 2c 40 21 09 1e b8 93 bb-ac e0 67 e1 80 38 7d 75   ,@!.......g..8}u
    01d0 - 5c b0 48 74 7f 2c e7 3c-aa 43 39 64 dc d6 88 08   \.Ht.,.<.C9d....
    01e0 - b8 91 22 8d 59 b3 5d 5f-27 b2 35 03 82 87 59 70   ..".Y.]_'.5...Yp
    01f0 - 2d ff 9f 25 7f b3 00 aa-0e 49 f0 c8 be 93 d2 00   -..%.....I......
    0200 - 95 6e a0 59 a4 83 ef 51-02 e8 93 17 6b 9f 93 2e   .n.Y...Q....k...
    0210 - 6b 57 83 dc 92 a5 90 0b-86 56 b5 2d d8 b2 c3 7f   kW.......V.-....
    0220 - ce 9d 31 54 c7 4c 07 25-a2 55 82 6c 49 b2 79 9a   ..1T.L.%.U.lI.y.
    0230 - c0 86 de 51 34 2b 59 88-ce a2 7e 2e 45 cb ac a3   ...Q4+Y...~.E...
    0240 - 0b e8 8b 05 57 8d 48 e9-f2 51 9b d6 65 b6 32 93   ....W.H..Q..e.2.
    0250 - a0 97 be 49 b2 a9 c0 f8-7a 55 f3 f3 c3 86 76 c0   ...I....zU....v.
    0260 - aa fc da e7 3b 6f eb 72-33 aa 76 cc dc 0f 0c f5   ....;o.r3.v.....
    0270 - 2d 55 03 9d 7a f4 87 fa-47 98 8f 8d 1a 70 db d2   -U..z...G....p..
    0280 - 39 80 55 35 79 b5 16 c7-71 12 6c bf fb c0 be 15   9.U5y...q.l.....
    0290 - 50 79 79 f9 ef ce c9 7e-f9 9e 53 78 ed 39 23 19   Pyy....~..Sx.9#.
    02a0 - b3 d0 a8 c2 de 2e 9c 2f-0e a0 3d 33 96 39 5c f8   ......./..=3.9\.
    02b0 - d5 91 63 34 2a ca 12 e3-51 dc 3e 7f 7b 77 02 98   ..c4*...Q.>.{w..
    02c0 - 2c f5 af e0 d0 95 df a4-7d 5c 9a a4 b7 e3 53 6d   ,.......}\....Sm
    02d0 - f1 44 7c 67 0b 81 42 cc-ee d9 4a 6a 08 8b 0e 81   .D|g..B...Jj....
    02e0 - 44 90 fd 98 7c 25 61 f9-04 8c d7 2e 54 53 f0 99   D...|%a.....TS..
    02f0 - 95 16 a5 9f 65 f0 58 45-94 70 3d 5b 68 d4 92 93   ....e.XE.p=[h...
    0300 - c2 4d 75 ee 0f 94 6b 96-ce 1d 7b 0e 62 c8 7b 12   .Mu...k...{.b.{.
    0310 - 68 bd 07 6f 2c f5 fb 76-d6 0a 15 5c 6c 7a 36 04   h..o,..v...\lz6.
    0320 - 9e 08 a0 b8 1c a6 92 f9-25 5f c6 3e 97 8f 6e 8d   ........%_.>..n.
    0330 - 33 16 2b b9 8a 70 b2 0f-b4 d0 6e c9 2d 90 2e 60   3.+..p....n.-..`
    0340 - 4f 5c 26 d6 fa ef 09 e4-cc 15 1c 24 c0 f4 31 97   O\&........$..1.
    0350 - 0a 22 14 68 a4 8c 4f 2c-51 de 9a 0b 0a 62 d0 05   .".h..O,Q....b..
    0360 - 1b 42 73 24 8e 27 b8 ee-6a 9a 2b 60 07 8a 32 e2   .Bs$.'..j.+`..2.
    0370 - 76 1d 9c ca 08 09 e6 44-78 14 a1 d9 de 73 3a 0a   v......Dx....s:.
    0380 - 86 0f 56 3e 97 e4 79 74-74 82 77 58 bb 67 14 5d   ..V>..ytt.wX.g.]
    0390 - 39 dc d5 77 48 2b 2c 51-91 3e a4 86 fd e1 74 8b   9..wH+,Q.>....t.
    03a0 - 15 1e f4 d3 7c 62 bf 9b-85 8f 68 f1 de 54 56 8c   ....|b....h..TV.
    03b0 - c4 1c 32 d5 b2 c3 5b bf-c6 eb 14 bb 4f ad 41 4e   ..2...[.....O.AN
    03c0 - 37 ab 3c 0f c9 75 8f 6d-2f 9c 44 f3 c3 7c 2b d0   7.<..u.m/.D..|+.
    03d0 - c6 9e 53 fe 23 b8 25 03-51 ec 12 75 68 c3 c4 72   ..S.#.%.Q..uh..r
    03e0 - 38 4b 03 6d fc b4 88 19-bd e3 55 12 de a1 03 87   8K.m......U.....
    03f0 - d2 d1 bf 8c da c3 fc b2-ff d7 1e 65 fb 2f 52 c0   ...........e./R.
    0400 - 0f eb 5e 23 16 8d b8 c5-f1 25 84 38 c4 9a 20 e3   ..^#.....%.8.. .
    0410 - e6 6d 38 32 13 f1 e1 18-b5 36 85 d7 cd d1 08 c2   .m82.....6......
    0420 - 49 0d 9c eb f6 fa fe 53-17 ff eb 3e d0 e8 c2 f5   I......S...>....
    0430 - 27 88 8c ca da 41 c9 0e-af 69 c5 e1 39 23 6e e2   '....A...i..9#n.
    0440 - d3 00 f1 60 35 34 8c 4c-d4 8d 34 f2 b1 2f 6b 8d   ...`54.L..4../k.
    0450 - 31 4a 50 36 f9 21 13 76-00 82 f1 eb c6 3b f1 40   1JP6.!.v.....;.@
    0460 - 3e 41 2b af ab cf 33 be-24 26 1f a4 89 38 33 b7   >A+...3.$&...83.
    0470 - fb 5d 4c 7e 6a 06 82 d9-7e 3b dd 8f fa 8a c5 4d   .]L~j...~;.....M
    0480 - 2c 6e f1 cc 29 d2 ed ec-85 9d 10 1c a7 9c 0a 1b   ,n..)...........
    0490 - cb 78 9e 06 94 5b 13 78-6e eb 1c c0 94 8a 46 d3   .x...[.xn.....F.
    04a0 - 3b 5c 43 06 47 79 e3 47-77 49 05 1c 61 00 01 11   ;\C.Gy.GwI..a...
    04b0 - fc 88 59 95 e9 1a 10 ae-3d 18 db ca 99 ef 65 5e   ..Y.....=.....e^
    04c0 - ea c8 9a 8a 16 d4 42 bb-0a fe 16 92 12 ae df f1   ......B.........
    04d0 - ca e6 f3 ba 11 1c 66 cc-82 16 d6 d9 7a dd 7b b3   ......f.....z.{.
    04e0 - b5 fa 93 bd 7d ea 8e 4c-3b 94 15 42 76 0d 8f 49   ....}..L;..Bv..I
    04f0 - f2 bb d8 f2 dc 88 86 d3-6f 22 8d b6 44 c2 5f 74   ........o"..D._t
    0500 - e8 3e 80 8a 63 0f 3a 6c-63 3f 10 f2 fb b0 23 00   .>..c.:lc?....#.
    0510 - e3 81 ed 09 09 3e 7d a2-d9 9f 54 15 ea d8 d6 67   .....>}...T....g
    0520 - ac 3e ff 17 4f 16 5d e8-f0 6a 7b e4 2a 3c 49 67   .>..O.]..j{.*<Ig
    0530 - fd 5c 70 d0 e3 e8 d9 03-f9 e8 45 5a 64 19 68 10   .\p.......EZd.h.
    0540 - cd 4d 80 44 88 46 02 f9-be df cf c9 23 e2 c2 8e   .M.D.F......#...
    0550 - 88 ee 11 09 8a d9 0e 99-b9 3e 62 29 ce 12 cd 13   .........>b)....
    0560 - 10 e9 79 b6 51 ce 82 ba-c4 dc 3b 8c 1c 29 17 4b   ..y.Q.....;..).K
    0570 - fa ab 02 00 0a 52 43 02-45 7c 81 06 0e 2a 0a 6d   .....RC.E|...*.m
    0580 - 00 e5 b3 24 74 4e da ce-9f 78 04 ec b2 25 cf f9   ...$tN...x...%..
    0590 - 84 d6 b1 e5 60 eb 06 6a-17 32 07 f0 d6 12 6c fb   ....`..j.2....l.
    05a0 - d5 3d ea fa 5d 95 c8 ff-52 95 2d df 59 0b 2d 4e   .=..]...R.-.Y.-N
    05b0 - d1 e8 c6 16 fb ae 75 39-60 08 01 a1 c7 0f 67 3a   ......u9`.....g:
    05c0 - a5 93 89 b4 92 6d 26 06-c5 67 29 cb e6 ac de 98   .....m&..g).....
    05d0 - ba dc f4 9f 41 38 fe 20-b5 42 50 6f 7c 1a 5a e8   ....A8. .BPo|.Z.
    05e0 - 6e 67 23 10 11 7b 3e 3a-21 a3 4f 2d fb 2c f4 51   ng#..{>:!.O-.,.Q
    05f0 - 8d 92 d7 59 cc e9 bc 19-a1 4c c7 af 76 92 a9 35   ...Y.....L..v..5
    0600 - 57 80 51 15 ea db e6 72-1b 0e 05 57 7c 69 30 97   W.Q....r...W|i0.
    0610 - 89 55 15 ac 91 c0 3a c5-77 89 bd d0 44 ad a1 83   .U....:.w...D...
    0620 - 13 fb c4 5d da 0b 1d 76-00 3d 50 ea 3f 43 50 0b   ...]...v.=P.?CP.
    0630 - 9a 85 6e 82 fa 65 c6 5c-c4 2e af d6 d8 60 a2 c7   ..n..e.\.....`..

    Start Time: 1425904210
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---

Kindly help me to find out what the problem is, by now I am suspecting that something is wrong in Push Notifications module because I am able to connect successfully using the SSL command via SSH.

PS: Marking as "Critical" in order to bring this in attention, please change if this is not critical :)

Reference: http://stackoverflow.com/a/18529519/260665

ptmkenny’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

@Gumdal: Can you give steps to reproduce this problem from a fresh installation of Drupal 7?

The stack overflow question you referenced has a solution; did that answer not work for you?

P.S. Issues are not "critical" unless they break all sites. The module not working for your site alone is no reason to mark it is critical.

gumdal’s picture

@ptmkenny - I have not tried from fresh installation of Drupal 7, I tried to migrate an existing website to Amazon EC2 just to support Push Notifications. The steps are pretty simple. I just installed the Push Notification module and I tried to trigger a Test Push Notification. I am sure that there is nothing wrong in SSL connection from EC2 server with the test results which I have posted above already. However, there is something wrong if I try to trigger Push Notification through the module. This is the information I have currently, hope this information will suffice you. I will also try to research more on code to my best extent and post my findings here, if any!

sammuell’s picture

Title: Warning: stream_socket_client(): » Missing root CA: Warning: stream_socket_client():
FileSize
5.16 KB

This error is caused by a missing root certificate on the server. The attached patch adds a config option to explicitely set the certificate when connecting to APNS. The certificate is also included in the patch.

lolandese’s picture

Status: Postponed (maintainer needs more info) » Needs review

There is a patch to review.

sammuell’s picture

Version: 7.x-1.0-beta2 » 7.x-1.x-dev
TbanRguez’s picture

#14 ok for me!

sammuell’s picture

Status: Needs review » Reviewed & tested by the community

haagendazs’s picture

Status: Reviewed & tested by the community » Fixed

Amazing find! Committed this to the dev branch (http://cgit.drupalcode.org/push_notifications/commit/?id=0f8ea17), it'll be included in 7.x-1.2. I made a small tweak and moved the certificate to the certificates directory.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

gumdal’s picture

TLS requires root certificate, but the TCP sockets are now obsolte and I think will be deprecated in future. I have created a new feature request for the same here: https://www.drupal.org/node/2743109.

Perhaps this bug will have to be revisited in case the above feature request is addressed? (Not sure)