Skip to content

Instantly share code, notes, and snippets.

@koichik
Created August 10, 2011 15:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koichik/1137067 to your computer and use it in GitHub Desktop.
Save koichik/1137067 to your computer and use it in GitHub Desktop.
tls image
cleartext cleartext
write() ↓ ↑ 'data'
+------------+ +---------------------------------------+
| | cleartext| _pending ↑ |
| |-------------| _pull() ↓ CleartextStream ↑ _push() |
| |pair |_puller() ↓ ↑ _pusher()|
| | +---------------------------------------+
| | clearIn ↓ ↑ clearOut
| | ssl+---------------------------------------+
| SecurePair |-------------| OpenSSL |
| | +---------------------------------------+
| | encOut ↓ ↑ encIn
| | +---------------------------------------+
| | encrypt|_pusher() ↓ ↑ _puller()|
| |-------------| _push() ↓ EncryptedStream ↑ _pull() |
| |pair | ↓ _pending |
+------------+ +---------------------------------------+
'data' ↓ ↑ 'data'
+----------------+ +----------------+
| pipe() | | pipe() |
+----------------+ +----------------+
write() ↓ ↑ write()
+---------------------------------------+
| net.Socket |
+---------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment