Skip to content

Commit

Permalink
Improve and extend Secure Session API docs (#380)
Browse files Browse the repository at this point in the history
* Improve and extend Secure Session API docs

Write module-level docs based on description on Wiki. Describe API
flavors of Secure Session and update the method descriptions as well.

* Rename constructor of Secure Session

Rename the constructor to just "new()" to avoid misleading name.

* Reorder Secure Session methods for clarity

Group callback API and buffer-oriented API together in rustdoc output.
This makes navigation a bit easier.

* Rename Secure Session methods for consistency

Use the same naming as other language wrappers do:

- connect_request, wrap, unwrap for buffer-oriented API
- connect, send, receive for callback API

Other wrappers do not have a separate method for negotiation so we have
to invent something here. Keep the naming consistent.

* Use impl Trait in Secure Session methods

Replace explicit templates with impl Trait which makes code a bit
easier to read.

* Check for empty client ID in Secure Session

Secure Session is not able to negotiate connection if the client ID
is empty so do an early check and return an error to the user if the
provided client ID is invalid.

Using expect_err() with Result revealed tha SecureSession does not have
a Debug impl. All public types should have one so invent something.

* Update changelog
  • Loading branch information
ilammy authored Feb 15, 2019
1 parent e8c9ee3 commit 27d9402
Show file tree
Hide file tree
Showing 3 changed files with 437 additions and 275 deletions.
7 changes: 7 additions & 0 deletions src/wrappers/themis/rust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,16 @@ The version currently under development.
with other language wrappers. They are now called `PrivateKey` instead
of `SecretKey` (ditto for `RsaSecretKey`, `EcdsaSecretKey`). ([#362])

- `SecureSession` interface has been overhauled for better usability.
([#373], [#374], [#375], [#380])

[#358]: https://github.com/cossacklabs/themis/pull/358
[#362]: https://github.com/cossacklabs/themis/pull/362
[#365]: https://github.com/cossacklabs/themis/pull/365
[#373]: https://github.com/cossacklabs/themis/pull/373
[#374]: https://github.com/cossacklabs/themis/pull/374
[#375]: https://github.com/cossacklabs/themis/pull/375
[#380]: https://github.com/cossacklabs/themis/pull/380

Version 0.0.3 — 2019-01-17
==========================
Expand Down
Loading

0 comments on commit 27d9402

Please sign in to comment.