aboutsummaryrefslogtreecommitdiff
path: root/include/salticidae/crypto.h
diff options
context:
space:
mode:
authorDeterminant <ted.sybil@gmail.com>2020-02-17 18:33:44 -0500
committerDeterminant <ted.sybil@gmail.com>2020-02-17 18:33:44 -0500
commit2587e2c1b944882bc0b1e5b088f605076baa3435 (patch)
tree0bd477537c53d35a73bcce1c0e078246ef4a7d5c /include/salticidae/crypto.h
parent4fed5578db7714d8317d1bfe9262143d25034d00 (diff)
WIP: use PeerId to identify peers and allow one-way handshake
Diffstat (limited to 'include/salticidae/crypto.h')
-rw-r--r--include/salticidae/crypto.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/salticidae/crypto.h b/include/salticidae/crypto.h
index 65acc2d..d0553fb 100644
--- a/include/salticidae/crypto.h
+++ b/include/salticidae/crypto.h
@@ -376,7 +376,9 @@ class TLS {
TLS(const TLS &) = delete;
TLS(TLS &&other): ssl(other.ssl) { other.ssl = nullptr; }
- bool do_handshake(int &want_io_type) { /* 0 for read, 1 for write */
+ bool do_handshake(int &want_io_type) {
+ /* want_io_type: 0 for read, 1 for write */
+ /* return true if handshake is completed */
auto ret = SSL_do_handshake(ssl);
if (ret == 1) return true;
auto err = SSL_get_error(ssl, ret);