Go Down

Topic: Yún and SSL (Read 5768 times) previous topic - next topic

Stu1987

Will the Yun be able to handle it by default? Or will it depend on the Linux distro..

Federico Fissore

The linux distro loaded on the Yun has all the packages to handle SSL connections. You can both access SSL enabled web sites (client) and host your files with SSL (server)
Have you upgraded the Yún? If you've just got it, then it needs to be upgraded! Check out the tutorial

Testato

so is it possible, from 32u4 micro and bridge library, have access to "https" website ?
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

Federico Vanzati

F

fibasile

Hi,

If you need to download something via https use curl with -k option, as wget is compiled without ssl support. Same applies to python, i.e. distribute module easy_install won't work with https urls.

Federico Fissore

This can be a nice feature request. Do you mind posting it on github?
Have you upgraded the Yún? If you've just got it, then it needs to be upgraded! Check out the tutorial

fibasile

Ok. I just posted it in the linino project on github.

Kryptman

wget seems to support ssl connections if you upgrade it via opkg. 

However, I'm really looking forward to a python installation with ssl.  I'd like to twitter some sensor values, and I don't want to go through temboo.  If I'd wanted that, I could have just used a standard wifi shield and http://arduino-tweet.appspot.com/.  I want to send tweets directly, but the python twitter library build fails because ssl doesn't work in python.  Took me a while to figure that out and I was actually a bit disappointed to be foiled by something like that.

Testato

i also believe that direct https support, whitout Temboo service, is an important feature.
- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

Federico Fissore

@Kryptman I think installing python-openssl should suffice. Can you give it a try?
Have you upgraded the Yún? If you've just got it, then it needs to be upgraded! Check out the tutorial

Kryptman

Jup, that did the trick.  Open mouth, insert foot.

Thanks for the assist...

Erni

This is great
After installing  python-openssl I am able to use my gmail account to send mails from Yun.

Just wanted to share:

Code: [Select]

#!/usr/bin/env python
import smtplib
from email.mime.text import MIMEText

USERNAME = "xxxxxx@gmail.com"
PASSWORD = "xxxxxx"
MAILTO  = "you@yourmail.com"

msg = MIMEText('Hello,\nMy name is Yun, \nhow are you')
msg['Subject'] = 'Mail from Yun'
msg['From'] = USERNAME
msg['To'] = MAILTO

server = smtplib.SMTP('smtp.gmail.com:587')
server.ehlo_or_helo_if_needed()
server.starttls()
server.ehlo_or_helo_if_needed()
server.login(USERNAME,PASSWORD)
server.sendmail(USERNAME, MAILTO, msg.as_string())
server.quit()

Federico Fissore

Have you upgraded the Yún? If you've just got it, then it needs to be upgraded! Check out the tutorial

roadfun

Found my solution in this thread, I can now run Temboo choreos from Linux on the Yun!

ralphcrutzen


@Kryptman I think installing python-openssl should suffice. Can you give it a try?


How do I install this? I installed the module from https://pypi.python.org/pypi/pyOpenSSL. But I don't think this is the right one, because when I try to install it on the Yun I get the following error:
Code: [Select]

root@Arduino:/mnt/sda1/arduino/pyOpenSSL-0.13.1# python setup.py install
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe'
  warnings.warn(msg)
running install
running build
running build_py
running build_ext
building 'OpenSSL.crypto' extension
mips-openwrt-linux-uclibc-gcc -fno-strict-aliasing -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -DNDEBUG -Os -pipe -mips32r2 -mtune=mips32r2 -fno-caller-saves -mno-branch-likely -fhonour-copts -Wno-error=unused-but-set-variable -msoft-float -fPIC -I/usr/include/python2.7 -c OpenSSL/crypto/crypto.c -o build/temp.linux-mips-2.7/OpenSSL/crypto/crypto.o
unable to execute mips-openwrt-linux-uclibc-gcc: No such file or directory
error: command 'mips-openwrt-linux-uclibc-gcc' failed with exit status 1


I'm trying to tweet a picture from my Yún with a Python script, so I don't have to use Temboo. I'm using Twython and also installed a bunch of its dependencies. Now I think I'm just this one little step away from making this work...

Go Up