security: E2EE and transport correctness (issue #147)
Some checks failed
CI Code / Check spelling (pull_request) Successful in 13s
CI Code / Check coding style (pull_request) Successful in 23s
CI Code / Code Coverage (pull_request) Failing after 3m23s
CI Code / Linux (debian) (pull_request) Failing after 5m32s
CI Code / Linux (arch) (pull_request) Failing after 6m54s
CI Code / Linux (ubuntu) (pull_request) Failing after 8m20s
Some checks failed
CI Code / Check spelling (pull_request) Successful in 13s
CI Code / Check coding style (pull_request) Successful in 23s
CI Code / Code Coverage (pull_request) Failing after 3m23s
CI Code / Linux (debian) (pull_request) Failing after 5m32s
CI Code / Linux (arch) (pull_request) Failing after 6m54s
CI Code / Linux (ubuntu) (pull_request) Failing after 8m20s
T04: promote security events to warnings — SASL auth failure, TLS handshake failure, cert-failure details, see-other-host redirect; DISABLE_TLS, TRUST_TLS and LEGACY_AUTH get a log warning plus a console notice (REQ-LOG-01, REQ-LOG-02, REQ-AUTH-03) T05: warn when a session ends up unencrypted without the user having asked for it; refuse in-band registration on an unencrypted stream; warn on each HTTP transfer with certificate verification disabled (REQ-CRY-03, REQ-CFG-01) T06: pin the update check to https with peer/host verification and no redirects; strict N.N.N parser for the fetched version, which is untrusted network input (REQ-VUL-02) T09: no plaintext logging on failed MUC OMEMO sends; OTR opportunistic first message passes allow_unencrypted_message(); get_random_string() draws from a CSPRNG without modulo bias; guard the identity-key length decrement against unsigned underflow (REQ-CRY-01, REQ-CRY-02, REQ-CRY-07, REQ-MEM-05) REQ-VUL-03 and REQ-CRY-09 are already satisfied on master and are left unchanged.
This commit is contained in:
@@ -117,6 +117,7 @@ main(int argc, char* argv[])
|
||||
PROF_FUNC_TEST(connect_jid_requests_bookmarks),
|
||||
PROF_FUNC_TEST(connect_bad_password),
|
||||
PROF_FUNC_TEST(connect_shows_presence_updates),
|
||||
PROF_FUNC_TEST(connect_warns_on_insecure_transport),
|
||||
|
||||
/* Ping tests - XEP-0199 XMPP Ping */
|
||||
PROF_FUNC_TEST(ping_server),
|
||||
|
||||
@@ -92,3 +92,15 @@ connect_shows_presence_updates(void **state)
|
||||
);
|
||||
assert_true(prof_output_exact("Buddy1 (mobile) is xa, \"Gone :(\""));
|
||||
}
|
||||
|
||||
void
|
||||
connect_warns_on_insecure_transport(void **state)
|
||||
{
|
||||
/* the harness connects with "tls disable auth legacy": both downgrades must reach the console */
|
||||
prof_connect();
|
||||
|
||||
prof_timeout(10);
|
||||
assert_true(prof_output_exact("Security warning: TLS is disabled, this connection is unencrypted."));
|
||||
assert_true(prof_output_exact("Security warning: legacy authentication is enabled for this connection."));
|
||||
prof_timeout_reset();
|
||||
}
|
||||
|
||||
@@ -3,3 +3,4 @@ void connect_jid_sends_presence_after_receiving_roster(void **state);
|
||||
void connect_jid_requests_bookmarks(void **state);
|
||||
void connect_bad_password(void **state);
|
||||
void connect_shows_presence_updates(void **state);
|
||||
void connect_warns_on_insecure_transport(void **state);
|
||||
|
||||
Reference in New Issue
Block a user