Channel Notification SSL issue

239 views
Skip to first unread message

Richard Cáceres

unread,
Aug 2, 2013, 9:19:27 PM8/2/13
to google-ca...@googlegroups.com
I am very close to getting Google Calendar API (v3) push notifications integrated into my application, but I have run into an issue.

Everytime a notification comes to my server, I get the following nginx error in my error log.

2013/08/02 17:47:01 [info] 16118#0: *231 client closed prematurely connection while SSL handshaking, client: 

It seems like Google is fails to approve my certificate, or something like that. Does anyone have any clue what the issue might be? Does google not allow self-signed certificates? 

Thank you.

Richard Cáceres

unread,
Aug 5, 2013, 8:01:33 PM8/5/13
to google-ca...@googlegroups.com
Followup to above:

The issue was indeed caused by the self-signed certificate. I went ahead and purchased a certificate (from dreamhost in my case), and now the google notifications are coming through.

So to reiterate, the Google Calendar API Push Notifications do not work with self-signed certificates.

Good day sir.

Mat Dudley

unread,
Nov 24, 2013, 7:28:01 AM11/24/13
to google-ca...@googlegroups.com
Hi Richard,

I'm trying to become more familiar with the push notification feature and had a few questions before jumping into buying an ssl cert for my web app.

I'm just curious - what does the response look like when an event in a calendar changes?  Will the API send you specifics about what has changed in the calendar, or will your app's reaction be to poll the entire calendar to look for changes?

I'm new to setting up HTTPS, and am wondering if there is an easy way to set this up in a development environment.  It looks like I would need to set this up with a fixed domain and a trusted certificate pointed to my computer at home in order for me to test push notifications on my home computer.  Is this correct?

Thanks in advance.
Mat

Richard Cáceres

unread,
Nov 24, 2013, 3:05:40 PM11/24/13
to google-ca...@googlegroups.com
Hi Mat,

Responses just inform you the id of what calendar changed (HTTP_X_GOOG_RESOURCE_ID). Then it is up to your code to pull the delta using your own timestamp-based logic.

For SSL development, I opened a tunnel from my public server to my local computer. This forwarded port 443 to my localhost:8000. You still need to have a valid certificate, but at least you can develop locally. The command looked like this:

"""

ssh -R443:127.0.0.1:8000 myu...@myserver.com

You must also add GatewayPorts yes to /etc/ssh/sshd_config.

"""



--
You received this message because you are subscribed to a topic in the Google Groups "Google Calendar API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-calendar-api/z9KtOml3qqQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-calendar...@googlegroups.com.
To post to this group, send email to google-ca...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-calendar-api.
For more options, visit https://groups.google.com/groups/opt_out.

Mat Dudley

unread,
Nov 24, 2013, 3:33:21 PM11/24/13
to google-ca...@googlegroups.com
Thanks for your reply.  I see - do you mean using listEvents() with the param of updatedMin to query the API of all changes since the last sync?

I'm not very familiar with SSL so I will need to look into that more closely.  Really appreciate your help though.  If the push notifications operate as I understand it to, I think it will be a good investment to learn and get SSL for my app.
To unsubscribe from this group and all its topics, send an email to google-calendar-api+unsub...@googlegroups.com.

dinesh reddy

unread,
Dec 11, 2013, 8:01:11 AM12/11/13
to google-ca...@googlegroups.com
Hi Richard,

Can you send us the working example ? Also did url whitelisting took time for you ?

Richard Cáceres

unread,
Dec 16, 2013, 5:22:10 PM12/16/13
to google-ca...@googlegroups.com
My code is too spread out across different files and functions to copy and paste an example. The documentation for the API has lots of good examples. Generally, changing a setting like whitelisting did not take much time to take affect.
Reply all
Reply to author
Forward
0 new messages