Pages: [1] 2   Go Down
Author Topic: Yún and SSL  (Read 4750 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Edison Member
*
Karma: 38
Posts: 1211
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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)
Logged

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

0
Offline Offline
Faraday Member
**
Karma: 46
Posts: 5840
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so is it possible, from 32u4 micro and bridge library, have access to "https" website ?
Logged

- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

Global Moderator
Milano, Italy
Offline Offline
Edison Member
*****
Karma: 19
Posts: 1175
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

yes
Logged

F

Offline Offline
Newbie
*
Karma: 1
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 38
Posts: 1211
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This can be a nice feature request. Do you mind posting it on github?
Logged

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

Offline Offline
Newbie
*
Karma: 1
Posts: 20
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Faraday Member
**
Karma: 46
Posts: 5840
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i also believe that direct https support, whitout Temboo service, is an important feature.
Logged

- [Guida] IDE - http://goo.gl/ln6glr
- [Lib] ST7032i LCD I2C - http://goo.gl/GNojT6
- [Lib] PCF8574+HD44780 LCD I2C - http://goo.gl/r7CstH

Offline Offline
Edison Member
*
Karma: 38
Posts: 1211
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Thanks for the assist...
Logged

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1063
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
#!/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()
Logged

Offline Offline
Edison Member
*
Karma: 38
Posts: 1211
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

\m/ rock on!
Logged

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

Offline Offline
Newbie
*
Karma: 0
Posts: 35
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@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:
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...
Logged

Pages: [1] 2   Go Up
Jump to: