Twitter

7 replies [Last post]
allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011

I don't know if anyone is still looking, but on the off chance, Twitter seems to have stopped working for me. Anyone else still using it?

brett
Offline
Providence, United States
Joined: 9 Jan 2010
I wonder how they broken it

I wonder how they broken it this time.   I'm using the twitter 1.1 API.  IF you set the CURL_DEBUG environment variables to 1 and restart xap-twitter does it display anything?   I'd have to fire up my trust dev box to check this out myself I think.

allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Twitter

Well if I've done it correctly then nothing is displayed when I issue /etc/init.d/xap restart twitter.

This is my env output.

USER=root
HOME=/root
LOGNAME=root
TERM=xterm
SHELL=/bin/ash
PWD=/mnt/jffs2/jffs2_3/root
CURL_DEBUG=1

brett
Offline
Providence, United States
Joined: 9 Jan 2010
I think Twitter have

I think Twitter have deprecated support for old SSL protocols which mean we need a newer curl library on the livebox.
On RHEL 5  (also old) I get the same error.   I need to move my aging development environment over to RHEL7 to see if this indeed is the issue.  If so I'd have to upgrade the curl library on the HAH firmware distribution to resolve it.

[brett@wombat xap-twitter]$ ./xap-twitter -d 9

Twitter Connector for xAP v12
Copyright (C) DBzoo 2009 

[inf][init.c:97:discoverBroadcastNetwork] 4 interfaces found
[inf][init.c:101:discoverBroadcastNetwork] 1) interface: lo
[inf][init.c:101:discoverBroadcastNetwork] 2) interface: eth0
[inf][init.c:108:discoverBroadcastNetwork] address: 192.168.1.9
[inf][init.c:120:discoverBroadcastNetwork] broadcast: 192.168.1.255
[inf][init.c:74:discoverHub] Acquired broadcast socket, port 3639
[inf][init.c:75:discoverHub] Assuming no local hub is active
[dbg][timeout.c:17:xapAddTimeoutAction] Add timeout. interval=60
[dbg][init.c:236:xapAddSocketListener] socket=4
[dbg][tcurl.c:27:clearCallbackBuffers] len: 256
[dbg][tcurl.c:265:getLatestTweet] Get tweet after this ID 0
[dbg][tcurl.c:98:performGet] https://api.twitter.com/1.1/statuses/user_timeline. json?user_id=95186468&trim_user=1&count=1
[dbg][tcurl.c:27:clearCallbackBuffers] len: 256
* About to connect() to api.twitter.com port 443 (#0)
* Trying 104.244.42.194... * connected
* Connected to api.twitter.com (104.244.42.194) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* Unknown SSL protocol error in connection to api.twitter.com:443
* Closing connection #0
[err][tcurl.c:125:performGet] curlCode: 35 msg: SSL connect error

I suspect this is the case:

https://www.thesslstore.com/blog/twitter-will-deprecate-support-for-tls-1-0-tls-1-1-on-july-15/

Update: Indeed the HAH is using curl-7.21.7 and support for TLSv1.2 was added after this release we need a mimum of 7.34
To make matters a little worse OpenSSL 0.9.8 does not support TLS 1.2 I'd need to also update this library to 1.0.1

allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Thanks for looking at this

Thanks for looking at this Brett.

Reassured to know that it is not just my settings that have gone awry. Totally beyond me to do any upgrading myself but if you find time to do it that would be fantastic. Obviously any time would do.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
I have updated curl to 7.34

I have updated curl to 7.34 and openssl to 1.0.1u
As I don't have a livebox I'm unable to test this however everything compiled !
I've made this available as a beta release/

To update to the beta
# /etc_ro_fs/update-dev hah-beta.dbzoo.com

to pull this image down and flash.  I strongly urge you to make a backup.

To test kill the xap-twitter process and run it on the cmd line as I was doing.
If you don't see an error all is good.

allanayr
Offline
Ayr, United Kingdom
Joined: 25 Sep 2011
Ah Brett you haven't lost

Ah Brett you haven't lost your touch!

It works beutifully. Thank you so much I'm very grateful.

brett
Offline
Providence, United States
Joined: 9 Jan 2010
Glorious.   I've made 318 an

Glorious.   I've made 318 an official update.  I should probably have gone for a later curl library but I was wary of the increase in file size even this minor update had on the firmware image.  I erred on side of caution choosing an older (smaller) curl library that would get the job done.  Glad it worked.

Hardware Info