Commit Graph

54 Commits

Author SHA1 Message Date
a1346054
65237a8ecf trim trailing whitespace 2021-08-25 19:19:52 +00:00
a1346054
a874a6400d fix spelling 2021-08-25 19:19:21 +00:00
Clayton Passmore
a6960d42e5
Fix link to rendezvous server repo in API doc
Fixes an issue where the link to the rendezvous server repository was being rendered as plain text in the docs.
2020-09-18 11:10:48 -04:00
Brian Warner
69bab3d814 docs/api: minor fixes 2018-12-24 14:33:41 -05:00
Brian Warner
34686a346a add dilation code
(this compresses several months of false starts and rearchitecting)
2018-12-23 15:21:08 -05:00
Jakub Wilk
24836cea63 docs: fix typos 2018-11-03 15:38:58 +01:00
Brian Warner
6f42433c57 docs/api: minor rephrasings 2018-05-28 23:42:04 -07:00
Baeumla
86edf01070 rendevouz server documentation update 2018-03-07 09:25:53 +01:00
Brian Warner
346cfa13e2 enable markdown (but use index.rst), small headline tweaks 2017-11-12 15:12:36 -08:00
Brian Warner
8b0a245e19 reject invalid codes with KeyFormatError
refs #212
2017-07-23 00:02:09 -05:00
Brian Warner
3392db779d api.md: s/generate_code/allocate_code/ 2017-06-26 13:50:40 +01:00
Brian Warner
2312f2ccce document new API (d=get_*), add get_welcome() 2017-05-15 02:13:24 -07:00
Brian Warner
d19b5850cc docs: Wormhole does not, in fact, have a make-Transit method
yet
2017-05-14 18:52:20 -07:00
Brian Warner
83e55f1f3e add w.when_key(), fix w.when_verified() to fire later
Previously, w.when_verified() was documented to fire only after a valid
encrypted message was received, but in fact it fired as soon as the shared
key was derived (before any encrypted messages are seen, so no actual
"verification" could occur yet).

This fixes that, and also adds a new w.when_key() API call which fires at the
earlier point. Having something which fires early is useful for the CLI
commands that want to print a pacifier message when the peer is responding
slowly. In particular it helps detect the case where 'wormhole send' has quit
early (after depositing the PAKE message on the server, but before the
receiver has started). In this case, the receiver will compute the shared
key, but then wait forever hoping for a VERSION that will never come. By
starting a timer when w.when_key() fires, and cancelling it when
w.when_verified() fires, we have a good place to tell the user that something
is taking longer than it should have.

This shifts responsibility for notifying Boss.got_verifier, out of Key and
into Receive, since Receive is what notices the first valid encrypted
message. It also shifts the Boss's ordering expectations: it now receives
B.happy() before B.got_verifier(), and consequently got_verifier ought to
arrive in the S2_happy state rather than S1_lonely.
2017-04-06 18:27:41 -07:00
Brian Warner
af3bb0095d docs: expand section on close() 2017-04-06 13:22:15 -07:00
Brian Warner
ba36562482 docs: move Dilation up next to Serialization, as both are speculative 2017-04-06 13:02:27 -07:00
Brian Warner
194f0be471 api.md: fix some typos 2017-04-06 12:49:33 -07:00
Brian Warner
d331c51c03 change completion API
* InputHelper returns full words, not just suffixes. I liked the fact that
  suffixes made it impossible to violate the "all matches will start with
  your prefix" invariant, but in practice it was fiddly to work with.
* add ih.when_wordlist_is_available(), so the frontend can block (after
  claiming the nameplate) until it can return a complete wordlist to
  readline. This helps the user experience, because readline wasn't really
  built to work with completions that change over time
* make the Wordlist responsible for appending hyphens to all non-final word
  completions. InputHelper remains responsible for hyphens on nameplates.
  This makes the frontend simpler, but I may change it again in the future if
  it helps non-readline GUI frontends.
* CodeInputter: after claiming, wait for the wordlist rather than returning
  an empty list
* PGPWordList: change to match

This has the unfortunate side-effect that e.g. typing "3-yucatan-tu TAB"
shows you completions that include the entire phrase: "3-yucatan-tumor
3-yucatan-tunnel", rather than only mentioning the final word. I'd like to
fix this eventually.
2017-04-06 12:22:45 -07:00
Brian Warner
bdef446ad4 get mostly-full coverage for rlcompleter, rename, export 2017-04-06 12:22:45 -07:00
Brian Warner
b981b4260d docs: reminder that welcome_handler may be called multiple times 2017-04-06 12:22:45 -07:00
Brian Warner
76f5960517 rewrite welcome handler 2017-04-06 12:22:45 -07:00
Brian Warner
07a49bfaca make progress on rlcompleter, still broken 2017-04-06 12:22:44 -07:00
Brian Warner
e66d2df9f1 test and fix wordlist methods 2017-04-06 12:22:44 -07:00
Brian Warner
3873f55d64 make Input tests pass, clarify error cases, cleanups 2017-04-06 12:22:44 -07:00
Brian Warner
4f1b352b2a more work: allocator, input, shift responsibilities 2017-04-06 12:22:44 -07:00
Brian Warner
299f89c01f new idea on code-input helper API 2017-04-06 12:22:44 -07:00
Brian Warner
4bd9d3579c go back to "input_code" instead of "type_code" 2017-04-06 12:22:44 -07:00
Brian Warner
5f9894ca63 API updates, make most tests pass, disable others
* finally wire up "application versions"
* remove when_verifier (which used to fire after key establishment, but
  before the VERSION message was received or verified)
* fire when_verified and when_version at the same time (after VERSION is
  verified), but with different args
2017-04-06 12:22:44 -07:00
Brian Warner
20ec911b6c add API list, and speculative sections on serialization and dilation 2017-04-06 12:22:44 -07:00
Brian Warner
b4fdcfe53b update api.md 2017-04-06 12:22:44 -07:00
Brian Warner
98e3df1e4d api.md: mark argument slightly better 2017-04-06 12:12:42 -07:00
Shirley Kotian
abec2d2680 typos 2017-03-18 18:39:54 +05:30
Brian Warner
06d2a0be68 update docs 2016-05-25 20:58:53 -07:00
Brian Warner
104ef44d53 provide wormhole() as a function, rather than a class constructor
You must always provide a reactor= argument. In the future, omitting the
reactor= argument is how you ask for a blocking Wormhole.
2016-05-12 16:45:54 -07:00
Brian Warner
4dfa569769 docs: remove named phases, Wormhole is now a record pipe 2016-05-12 16:45:54 -07:00
Brian Warner
cc369d6b1e api.md: fix typo 2015-11-12 09:30:48 -08:00
Brian Warner
80beb20631 make blocking.Wormhole into a context manager 2015-11-11 21:59:16 -08:00
Brian Warner
bf43dae2ad add multiple phases, change key-derivation strings
Because of the key-derivation change, clients will not be compatible
across this commit.
2015-10-06 20:39:20 -07:00
Brian Warner
35768d6738 wormhole/invitation code is now unicode 2015-10-06 19:42:10 -07:00
Brian Warner
7f6410812c transit URL, transit hints are now unicode 2015-10-06 19:29:59 -07:00
Brian Warner
9e1a00cbd9 appid and derive_key(purpose) are now unicode 2015-10-06 19:21:53 -07:00
Brian Warner
9ba7de6e1e relay-url is now unicode 2015-10-06 19:19:39 -07:00
Brian Warner
f24e05d4cb new Wormhole API: separate send_data()/get_data() calls 2015-10-03 22:03:27 -07:00
Brian Warner
b5d470fcda make blocking/send-file work on py3
* declare transit records and handshake keys are bytes, not str
* declare transit connection hints to be str
* use six.moves.socketserver, six.moves.input for Verifier query
* argparse "--version" writes to stderr on py2, stdout on py3
* avoid xrange(), use subprocess.Popen(universal_newlines=True)
2015-09-28 00:24:36 -07:00
Brian Warner
a7213d9c9a enforce bytes-vs-str in the API
The main wormhole code is str (unicode in py3, bytes in py2). Most
everything else must be passed as bytes in both py2/py3.

Keep the internal "side" string as a str, to make it easier to merge
with other URL pieces.
2015-09-28 00:24:36 -07:00
Brian Warner
5d93dccb88 appid and derive_key(purpose=) must be bytes, not unicode 2015-09-28 00:24:00 -07:00
Brian Warner
d76893c07e update docs/api.md for 0.4.0 2015-09-22 01:27:17 -07:00
Brian Warner
efd6d27cc6 rename SymmetricWormhole to just "Wormhole"
Update docs too. Now both blocking/ and twisted/ use "Wormhole".
2015-07-24 17:47:46 -07:00
Brian Warner
f6eeaab0e4 add docs for 0.3.0 2015-06-24 00:26:03 -07:00
Brian Warner
6ee09f5316 add demo of twisted flow, update docs
python -m wormhole.twisted.demo send-text TEXT -> CODE
python -m wormhole.twisted.demo receive-text CODE -> TEXT
2015-06-20 19:18:29 -07:00