libcurl, seven ssl libraries and one ssh library

24
libcurl, seven SSL libraries and one SSH library February 5th 2011

Upload: daniel-stenberg

Post on 25-Dec-2014

4.678 views

Category:

Technology


1 download

DESCRIPTION

libcurl, seven SSL libraries and one SSH library. From my 30 minute talk at Fosdem 2011

TRANSCRIPT

Page 1: libcurl, seven SSL libraries and one SSH library

libcurl, seven SSL libraries and one 

SSH libraryFebruary 5th 2011

Page 2: libcurl, seven SSL libraries and one SSH library

Daniel Stenberg

Email: [email protected]: @bagderWeb: daniel.haxx.seBlog: daniel.haxx.se/blog

● Free Software● Network hacker● Embedded developer● Consultant

Page 3: libcurl, seven SSL libraries and one SSH library

Agenda

● libcurl● SSL/TLS libraries● Why so many?● Differences● How?● SSH libraries● Why so few?

Page 4: libcurl, seven SSL libraries and one SSH library

Questions?

● questions?● remarks?● interrupt!

Page 5: libcurl, seven SSL libraries and one SSH library

general libcurl

● cURL since 1998● libcurl since 2000● today: DICT, FILE, FTP, FTPS, GOPHER, HTTP, 

HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP

● almost 40 bindings● widely used● MIT licensed

Page 6: libcurl, seven SSL libraries and one SSH library

libcurl and SSL

● HTTPS support added 1998 (later ftp­ssl, smtps, imaps, pop3s)

● SSLeay …turned into OpenSSL● GnuTLS added in 2005● YaSSL “support” 2006● NSS 2007● qssl 2007● PolarSSL 2010● axTLS 2010

Page 7: libcurl, seven SSL libraries and one SSH library

Why so many?

● Software wants to use SSL● Different set of requirements and 

demands● Licensing● What users/devs implement 

support for!

Page 8: libcurl, seven SSL libraries and one SSH library

Let's compare

● 7 libraries● what makes people select or 

reject each one?● Caveats: I'm focused on client­

side, I'm but a user of them

Page 9: libcurl, seven SSL libraries and one SSH library

OpenSSL

Established and proven

Many features

License

Documentation

Quirky API

leaves CN and SAN verification to apps

Big

Pro Con

Page 10: libcurl, seven SSL libraries and one SSH library

GnuTLS

License

Documentation

Many features (TLS1.2, SRP, etc)

Easy API

License

Less used

Big

Pro Con

Page 11: libcurl, seven SSL libraries and one SSH library

NSS

FIPS­140 licensed

Many features

DB vs file approach

too Firefox­focused

Documentation

Big

Pro Con

Page 12: libcurl, seven SSL libraries and one SSH library

qSSL

Runs on OS/400  Runs only on OS/400

Pro Con

Page 13: libcurl, seven SSL libraries and one SSH library

yaSSL

License

Has an OpenSSL API

Size?

Not fully emulating OpenSSL

Documentation

Less support and community

Pro Con

Page 14: libcurl, seven SSL libraries and one SSH library

PolarSSL

License

Size?

Documentation

Not widely tested

Less support and community

Pro Con

Page 15: libcurl, seven SSL libraries and one SSH library

axTLS

Very small

License

TLS only

Not widely tested

Less support and community

Pro Con

Page 16: libcurl, seven SSL libraries and one SSH library

Or by feature

● GPL● SRP● TLS 1.2● SSLv2● FIPS­140● Embedded focus● Runs on Windows

Page 17: libcurl, seven SSL libraries and one SSH library

How support them?

● started out as #ifdef maze● turned into an internal API each 

lib needs to provide

Page 18: libcurl, seven SSL libraries and one SSH library

an internal APIcurlssl_init()curlssl_cleanup()curlssl_connect()curlssl_connect_nonblocking()curlssl_session_free()curlssl_close_all()curlssl_close()curlssl_shutdown()curlssl_set_engine()curlssl_set_engine_default()curlssl_engines_list()curlssl_version(x,y)curlssl_data_pending(x,y)

Page 19: libcurl, seven SSL libraries and one SSH library

curlsslcurlssl_init()curlssl_cleanup()curlssl_connect()curlssl_connect_nonblocking()curlssl_session_free()curlssl_close_all()curlssl_close()curlssl_shutdown()curlssl_set_engine()curlssl_set_engine_default()curlssl_engines_list()curlssl_version(x,y)curlssl_data_pending(x,y)

sets the recv() and send() functions after successful handshake

Page 20: libcurl, seven SSL libraries and one SSH library

Maintain functionality

● hard● test cases● volunteer­based, non­stop 

distributed testing

Page 21: libcurl, seven SSL libraries and one SSH library

SSH libraries

● only 2 (libssh and libssh2)● SSH is a much less popular 

commodity protocol

Page 22: libcurl, seven SSL libraries and one SSH library

picked libssh2

● hand over socket to library● non­blocking operations● license

Page 23: libcurl, seven SSL libraries and one SSH library

Summary

● Lots of SSL libs● Very few SSH libs● Support them all is lots of work

Page 24: libcurl, seven SSL libraries and one SSH library

SSL comparison online

A start:

http://curl.haxx.se/docs/ssl-compared.html