+ All Categories
Home > Education > "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

"The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

Date post: 26-Jan-2015
Category:
Upload: it-people
View: 590 times
Download: 1 times
Share this document with a friend
Description:
 
193
THE SORRY STATE OF ССЛ Hynek Schlawack
Transcript
Page 1: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

THE SORRY STATE OF ССЛ

Hynek Schlawack

Page 2: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

@hynek https://hynek.me

https://github.com/hynek

Привет!

Page 3: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

https://www.variomedia.de

Page 4: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014
Page 5: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014
Page 6: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014
Page 7: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ONLY LINK

ox.cx/t

Page 8: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

WTF

Page 9: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

WTFSSL

Page 10: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

WTFSSL

& TLS

Page 11: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TIMELINE

Page 12: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TIMELINE1995: Secure Sockets Layer 2.0, Netscape

Page 13: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TIMELINE1995: Secure Sockets Layer 2.0, Netscape

1996: SSL 3.0, still Netscape

Page 14: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TIMELINE1995: Secure Sockets Layer 2.0, Netscape

1996: SSL 3.0, still Netscape

1999: Transport Layer Security 1.0, IETF

Page 15: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TIMELINE1995: Secure Sockets Layer 2.0, Netscape

1996: SSL 3.0, still Netscape

1999: Transport Layer Security 1.0, IETF

2006: TLS 1.1

Page 16: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TIMELINE1995: Secure Sockets Layer 2.0, Netscape

1996: SSL 3.0, still Netscape

1999: Transport Layer Security 1.0, IETF

2006: TLS 1.1

2008: TLS 1.2

Page 17: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

2013

Page 18: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

2013• newfound scrutiny

Page 19: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

2013• newfound scrutiny

• browsers add TLS 1.2

Page 20: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

2013• newfound scrutiny

• browsers add TLS 1.2

• just using TLS not enough

Page 21: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TLS

Page 22: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TLS• identity

Page 23: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TLS• identity

• confidentiality

Page 24: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TLS• identity

• confidentiality

• integrity

Page 25: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TLS HYGIENE

Page 26: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SERVERS

Page 27: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

BE UP-TO-DATE

• OpenSSL >= 1.0.1c

• Apache >= 2.4.0

• nginx >= 1.0.6 or 1.1.0

Page 28: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

BE UP-TO-DATE

• OpenSSL >= 1.0.1c

• Apache >= 2.4.0

• nginx >= 1.0.6 or 1.1.0

g

Page 29: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATES

• identity• validity

Page 30: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATES

• identity• validity• CA sig

Page 31: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATES

• identity• validity• CA sig

Page 32: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATES

• identity• validity• CA sig

Page 33: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATES

• identity• validity• CA sig

Page 34: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATES

• identity• validity• CA sig

Page 35: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

EXTENDED VALIDATION CERTIFICATES

Page 36: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

EXTENDED VALIDATION CERTIFICATES

Page 37: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST CHAIN

Page 38: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST CHAIN

Page 39: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST CHAIN

Page 40: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATES

• trust chain

Page 41: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATES

• trust chain

• host name/service

Page 42: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATES

• trust chain

• host name/service

• already/still valid?

Page 43: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

DISABLE

• SSL 2.0

Page 44: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

DISABLE

• SSL 2.0

• SSL 3.0 (if you can)

Page 45: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

DISABLE

• SSL 2.0

• SSL 3.0 (if you can)

• TLS compression

Page 46: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER SUITES

Page 47: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER

Page 48: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER

Cipher

Page 49: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER

CipherPlaintext

Page 50: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER

CipherPlaintext

Page 51: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER

Cipher CiphertextPlaintext

Page 52: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

Ciphertext

CIPHER

Cipher Plaintext

Page 53: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER: MODE

Page 54: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER: MODE

• CBC

Page 55: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER: MODE

• CBC

• stream ciphers

Page 56: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER: MODE

• CBC

• stream ciphers

• GCM

Page 57: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: PREFER THIS

Page 58: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: PREFER THIS

AES128-GCM&

Page 59: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: PREFER THIS

AES128-GCM&

ChaCha20

Page 60: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: FALL BACK TO

AES128-CBC

Page 61: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: IF LIFE IS CRUEL TO YOU

3DES-CBC

Page 62: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: EOL

Page 63: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: DANGEROUS

• EXP-*

Page 64: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: DANGEROUS

• EXP-*

• DES

Page 65: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: DANGEROUS

• EXP-*

• DES

• RC4

Page 66: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ENCRYPTION: DANGEROUS

• EXP-*

• DES

• RC4

Page 67: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

KEY EXCHANGE

Page 68: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

KEY EXCHANGEfast PFS

RSA ✔️ ❌

Page 69: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

KEY EXCHANGEfast PFS

RSA ✔️ ❌

DHE ❌ ✔️

Page 70: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

KEY EXCHANGEfast PFS

RSA ✔️ ❌

DHE ❌ ✔️

ECDHE ✔️ ✔️

Page 71: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

KEY EXCHANGEfast PFS

RSA ✔️ ❌

DHE ❌ ✔️

ECDHE ✔️ ✔️

Page 72: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

INTEGRITY: MACS

• Message Authentication Code

Page 73: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

INTEGRITY: MACS

• Message Authentication Code

• HMAC

Page 74: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

INTEGRITY: MACS

• Message Authentication Code

• HMAC

• GCM

Page 75: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

HAVE THE LAST WORD

Page 76: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

YOU’RE DONE!

Page 77: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

YOU’RE DONE!

(but test your results!)

Page 78: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATE

Page 79: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATE

Page 80: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATE

Page 81: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATE

Page 82: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATE

Page 83: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATE

Page 84: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATE

Page 85: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

PROTOCOLS

Page 86: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

PROTOCOLS

Page 87: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

PROTOCOLS

Page 88: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

PROTOCOLS

Page 89: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER SUITES

Page 90: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER SUITES

Page 91: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER SUITES

Page 92: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER SUITES

Page 93: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER SUITES

Page 94: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER SUITES

Page 95: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER SUITES

Page 96: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CIPHER SUITES

Page 97: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CLIENTS

Page 98: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

YOU HAD ONE JOB!

Page 99: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

YOU HAD ONE JOB!

VERIFY!

Page 100: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

VERIFY THE CERTIFICATE!

• valid?

Page 101: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

VERIFY THE CERTIFICATE!

• valid?

• trustworthy chain?

Page 102: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

VERIFY THE CERTIFICATE!

• valid?

• trustworthy chain?

• correct hostname/service?

Page 103: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST CHAIN

Page 104: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST CHAIN• VERIFY_PEER

Page 105: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST CHAIN• VERIFY_PEER

• trust stores OS dependent

Page 106: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST CHAIN• VERIFY_PEER

• trust stores OS dependent

• SSL_CTX_set_default_verify_paths

Page 107: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SYSTEM CA• FreeBSD: ca_root_nss

Page 108: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SYSTEM CA• FreeBSD: ca_root_nss

• debian/Red Hat: ca-certificates

Page 109: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SYSTEM CA• FreeBSD: ca_root_nss

• debian/Red Hat: ca-certificates

• OS X: TEA or homebrew

Page 110: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SYSTEM CA• FreeBSD: ca_root_nss

• debian/Red Hat: ca-certificates

• OS X: TEA or homebrew

• Windows: wincertstore

Page 111: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SYSTEM CA• FreeBSD: ca_root_nss

• debian/Red Hat: ca-certificates

• OS X: TEA or homebrew

• Windows: wincertstore

• or: Mozilla/certifi

Page 112: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

HOSTNAME VERIFICATION

OpenSSL to developers:

Page 113: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

HOSTNAME VERIFICATION

OpenSSL to developers:

LOL

Page 114: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

DON’T VERIFY TRUST CHAIN

I can pretend to be Google with any self-signed

certificate.

Page 115: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

DON’T VERIFY HOSTNAME

I can pretend to be Google with any valid certificate.

Page 116: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014
Page 117: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SET SOME OPTIONS

• acceptable ciphers

• disable SSL 2.0

Page 118: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

THAT’S ALL!

Page 119: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

USERS

Page 120: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

FUNDAMENTAL MISCONCEPTIONS

Page 121: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

FUNDAMENTAL MISCONCEPTIONS

• no end-to-end security

Page 122: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

FUNDAMENTAL MISCONCEPTIONS

• no end-to-end security

• metadata

Page 123: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

VPN?

Page 124: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

VPN?

• sees all your traffic

Page 125: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

VPN?

• sees all your traffic

• same for CDN

Page 126: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATE WARNINIGS

Page 127: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CERTIFICATE WARNINIGS

Page 128: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ROOT CERTIFICATE POISONING

Page 129: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST ISSUES

Page 130: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST ISSUES

Page 131: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST ISSUES

Page 132: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST ISSUES

Page 133: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST ISSUES• hacked

Page 134: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST ISSUES• hacked

• screw up

Page 135: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST ISSUES• hacked

• screw up

• court orders

Page 136: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

TRUST ISSUES• hacked

• screw up

• court orders

• big corp

Page 137: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014
Page 138: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

DON’T DO IT YOURSELF IF YOU CAN HELP IT.

Rule of Thumb

Page 139: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

STANDARD LIBRARY VS.

PYOPENSSL

Page 140: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

STANDARD LIBRARY

Page 141: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

STANDARD LIBRARY• terrible pre-3.3

Page 142: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

STANDARD LIBRARY• terrible pre-3.3

• very incomplete in 2.7

Page 143: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

STANDARD LIBRARY• terrible pre-3.3

• very incomplete in 2.7

• PFS impossible

Page 144: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

STANDARD LIBRARY• terrible pre-3.3

• very incomplete in 2.7

• PFS impossible

• missing options

Page 145: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

STANDARD LIBRARY• terrible pre-3.3

• very incomplete in 2.7

• PFS impossible

• missing options

• bound to Python’s OpenSSL

Page 146: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

HOSTNAME VERIFICATION

3.2– from ssl import match_hostname

2.4–2.7 pip install backports.ssl_match_hostname

Page 147: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

PYOPENSSL

Page 148: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

PYOPENSSL

• Python 2.6+, 3.2+, and PyPy

Page 149: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

PYOPENSSL

• Python 2.6+, 3.2+, and PyPy

• more complete API coverage

Page 150: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

PYOPENSSL

• Python 2.6+, 3.2+, and PyPy

• more complete API coverage

• PyCA cryptography!

Page 151: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CRYPTOGRAPHY.IO

Page 152: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CRYPTOGRAPHY.IO• Python crypto w/o footguns

Page 153: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CRYPTOGRAPHY.IO• Python crypto w/o footguns

• PyCA

Page 154: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CRYPTOGRAPHY.IO• Python crypto w/o footguns

• PyCA

• PyPy ♥ CFFI

Page 155: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CRYPTOGRAPHY.IO• Python crypto w/o footguns

• PyCA

• PyPy ♥ CFFI

• gives pyOpenSSL momentum

Page 156: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

HOSTNAME VERIFICATION

service_identity

Page 157: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

LIBRARIES &

FRAMEWORKS

Page 158: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SERVERSlib PFS good defaults configurable

eventlet hybrid ❌ ❌ ❌

gevent stdlib ❌ ❌ ❌

gunicorn depends ❌ ❌ ❌

Tornado stdlib ❌ ❌ ❌

Page 159: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SERVERSlib PFS good defaults configurable

eventlet hybrid ❌ ❌ ❌

gevent stdlib ❌ ❌ ❌

gunicorn depends ❌ ❌ ❌

Tornado stdlib ❌ ❌ ❌

Twisted 14.0 pyOpenSSL ✔️ ✔️ ✔️

Page 160: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SERVERSlib PFS good defaults configurable

eventlet hybrid ❌ ❌ ❌

gevent stdlib ❌ ❌ ❌

gunicorn depends ❌ ❌ ❌

Tornado stdlib ❌ ❌ ❌

Twisted 14.0 pyOpenSSL ✔️ ✔️ ✔️

uWSGI own C code ✔️ ❌ ✔️

Page 161: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SERVERSlib PFS good defaults configurable

eventlet hybrid ❌ ❌ ❌

gevent stdlib ❌ ❌ ❌

gunicorn depends ❌ ❌ ❌

Tornado stdlib ❌ ❌ ❌

Twisted 14.0 pyOpenSSL ✔️ ✔️ ✔️

uWSGI own C code ✔️ ❌ ✔️

Page 162: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CLIENTSlib verifies

certificatesverifies

hostnames good defaults

eventlet hybrid ❌ ❌ ❌

gevent stdlib ❌ ❌ ❌

Page 163: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CLIENTSlib verifies

certificatesverifies

hostnames good defaults

eventlet hybrid ❌ ❌ ❌

gevent stdlib ❌ ❌ ❌

Tornado stdlib ✔️ ✔️ ❌

Page 164: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CLIENTSlib verifies

certificatesverifies

hostnames good defaults

eventlet hybrid ❌ ❌ ❌

gevent stdlib ❌ ❌ ❌

Tornado stdlib ✔️ ✔️ ❌

Twisted 14.0 pyOpenSSL depends depends ✔️

Page 165: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CLIENTSlib verifies

certificatesverifies

hostnames good defaults

eventlet hybrid ❌ ❌ ❌

gevent stdlib ❌ ❌ ❌

Tornado stdlib ✔️ ✔️ ❌

Twisted 14.0 pyOpenSSL depends depends ✔️

urllib2 stdlib ❌ ❌ ❌

Page 166: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CLIENTSlib verifies

certificatesverifies

hostnames good defaults

eventlet hybrid ❌ ❌ ❌

gevent stdlib ❌ ❌ ❌

Tornado stdlib ✔️ ✔️ ❌

Twisted 14.0 pyOpenSSL depends depends ✔️

urllib2 stdlib ❌ ❌ ❌

urllib3/requests hybrid ✔️ ✔️ ✔️

Page 167: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SUMMARY

Page 168: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SUMMARY

• keep TLS out of Python if you can

Page 169: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SUMMARY

• keep TLS out of Python if you can

• use pyOpenSSL-powered requests for HTTPS

Page 170: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SUMMARY

• keep TLS out of Python if you can

• use pyOpenSSL-powered requests for HTTPS

• write servers in Twisted

Page 171: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SUMMARY

• keep TLS out of Python if you can

• use pyOpenSSL-powered requests for HTTPS

• write servers in Twisted

• use pyOpenSSL

Page 172: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SUMMARY

• keep TLS out of Python if you can

• use pyOpenSSL-powered requests for HTTPS

• write servers in Twisted

• use pyOpenSSL

• use Python 2 stdlib only for clients

Page 173: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

WHY SORRY?

Page 174: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

IMPLEMENTATIONS

Page 175: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

IMPLEMENTATIONS

Page 176: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

USERS

Page 177: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

USERS

• run outdated software

Page 178: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

USERS

• run outdated software

• click certificate warnings away

Page 179: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

USERS

• run outdated software

• click certificate warnings away

• are at the mercy of 3rd parties

Page 180: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SERVERS

Page 181: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

SERVERS

Page 182: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CLIENTS

Page 183: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

PYTHON

Is at the forefront of terrible.

Page 184: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

HOPE

Page 185: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

HOPE

• people care again

Page 186: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

HOPE

• people care again

• stdlib

Page 187: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

HOPE

• people care again

• stdlib

• PyCA

Page 188: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CALLS TO ACTION

Page 189: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CALLS TO ACTION

Page 190: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CALLS TO ACTION

Page 191: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CALLS TO ACTION

Page 192: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

CALLS TO ACTION

Page 193: "The Sorry State of SSL" Hynek Schlawack, PyConRu 2014

ox.cx/t@hynek

vrmd.de


Recommended