finds.dev← search

// the find

mikepound/tls-exercises

★ 272 · Java · NOASSERTION · updated Aug 2025

Programming secure connections in Python and Java

A hands-on exercise set for learning TLS in Python and Java, covering basic SSL connections, mutual TLS authentication, and certificate pinning. It's companion material for a Computerphile-affiliated O'Reilly course by a University of Nottingham lecturer. Aimed at developers who know the language but have never touched TLS code directly.

The three exercises build on each other in the right order — basic connection, then mTLS, then pinning — which matches how you'd actually need TLS features in production. The CA directory is fully materialized with real OpenSSL-generated certs and keys, so you're not fighting certificate setup before you even start the exercises. Having answers checked in means you can diff your attempt against a working solution without hunting for one. Both Python ssl and Java javax.net.ssl are covered, which surfaces how differently the two ecosystems expose the same underlying concepts.

The certificates were generated with OpenSSL 1.1.1b and the Python exercises target 3.6/3.7 — both well past end of life, so learners on current tooling may hit subtle compatibility issues before they even get to the TLS concepts. Private keys are committed to the repo (ca/intermediate/private/), which is fine for a throwaway teaching CA but trains bad habits in exactly the audience that needs good ones. There's no exercise covering TLS 1.3-specific features or session resumption, so the coverage stops short of what you'd care about in 2025. No automated test or verification step — you run the client and server manually and infer success from the absence of exceptions, which is a shaky feedback loop for learners.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →