Commit 9a90e5e9 authored by Ian Goldberg's avatar Ian Goldberg

Remove trailing whitespace from source lines

parent ec38ddb5
......@@ -194,7 +194,7 @@ gcry_error_t otrl_auth_start_v23(OtrlAuthInfo *auth, int version)
enc = NULL;
/* Now serialize the message */
lenp = OTRL_HEADER_LEN + (auth->protocol_version == 3 ? 8 : 0) + 4
lenp = OTRL_HEADER_LEN + (auth->protocol_version == 3 ? 8 : 0) + 4
+ auth->encgx_len + 4 + 32;
bufp = malloc(lenp);
if (bufp == NULL) goto memerr;
......@@ -652,7 +652,7 @@ static gcry_error_t create_revealsig_message(OtrlAuthInfo *auth,
auth->our_dh.pub, auth->their_pub, privkey, auth->our_keyid);
if (err) goto err;
buflen = OTRL_HEADER_LEN + (auth->protocol_version == 3 ? 8 : 0) + 4 + 16
buflen = OTRL_HEADER_LEN + (auth->protocol_version == 3 ? 8 : 0) + 4 + 16
+ 4 + authlen + 20;
buf = malloc(buflen);
if (buf == NULL) goto memerr;
......@@ -731,7 +731,7 @@ static gcry_error_t create_signature_message(OtrlAuthInfo *auth,
auth->our_keyid);
if (err) goto err;
buflen = OTRL_HEADER_LEN + (auth->protocol_version == 3 ? 8 : 0) + 4
buflen = OTRL_HEADER_LEN + (auth->protocol_version == 3 ? 8 : 0) + 4
+ authlen + 20;
buf = malloc(buflen);
if (buf == NULL) goto memerr;
......
......@@ -267,7 +267,7 @@ ConnContext * otrl_context_find(OtrlUserState us, const char *user,
(usercmp == 0 && acctcmp == 0 &&
(protocmp = strcmp((*curp)->protocol, protocol)) > 0) ||
(usercmp == 0 && acctcmp == 0 && protocmp == 0
&& (their_instance < OTRL_MIN_VALID_INSTAG ||
&& (their_instance < OTRL_MIN_VALID_INSTAG ||
((*curp)->their_instance >= their_instance))))
/* We're at the right place in the list. We've either found
* it, or gone too far. */
......
......@@ -898,10 +898,10 @@ static void message_malformed(const OtrlMessageAppOps *ops,
* "context->app" field, for example. If you don't need to do this, you
* can pass NULL for the last two arguments of otrl_message_receiving.
*
* If non-NULL, ops->convert_msg will be called after a data message is
* If non-NULL, ops->convert_msg will be called after a data message is
* decrypted.
*
* If "contextp" is not NULL, it will be set to the ConnContext used for
* If "contextp" is not NULL, it will be set to the ConnContext used for
* receiving the message.
*
* If otrl_message_receiving returns 1, then the message you received
......@@ -1929,7 +1929,7 @@ void otrl_message_disconnect_all_instances(OtrlUserState us,
ConnContext *context;
if (!username || !accountname || !protocol) return;
context = otrl_context_find(us, username, accountname,
protocol, OTRL_INSTAG_MASTER, 0, NULL, NULL, NULL);
......@@ -2015,7 +2015,7 @@ void otrl_message_poll(OtrlUserState us, const OtrlMessageAppOps *ops,
int still_waiting = 0;
if (us == NULL) return;
for (contextp = us->context_root; contextp; contextp = contextp->next) {
/* If this is a master context, and it's still waiting for a
* v3 DHKEY message, see if it's waited long enough. */
......
......@@ -257,19 +257,19 @@ typedef struct s_OtrlMessageAppOps {
/* When timer_control is called, turn off any existing periodic
* timer.
*
*
* Additionally, if interval > 0, set a new periodic timer
* to go off every interval seconds. When that timer fires, you
* must call otrl_message_poll(userstate, uiops, uiopdata); from the
* main libotr thread.
*
*
* The timing does not have to be exact; this timer is used to
* provide forward secrecy by cleaning up stale private state that
* may otherwise stick around in memory. Note that the
* timer_control callback may be invoked from otrl_message_poll
* itself, possibly to indicate that interval == 0 (that is, that
* there's no more periodic work to be done at this time).
*
*
* If you set this callback to NULL, then you must ensure that your
* application calls otrl_message_poll(userstate, uiops, uiopdata);
* from the main libotr thread every definterval seconds (where
......@@ -278,11 +278,11 @@ typedef struct s_OtrlMessageAppOps {
* right after creating the userstate). The advantage of
* implementing the timer_control callback is that the timer can be
* turned on by libotr only when it's needed.
*
*
* It is not a problem (except for a minor performance hit) to call
* otrl_message_poll more often than requested, whether
* timer_control is implemented or not.
*
*
* If you fail to implement the timer_control callback, and also
* fail to periodically call otrl_message_poll, then you open your
* users to a possible forward secrecy violation: an attacker that
......@@ -350,10 +350,10 @@ gcry_error_t otrl_message_sending(OtrlUserState us,
* "context->app" field, for example. If you don't need to do this, you
* can pass NULL for the last two arguments of otrl_message_receiving.
*
* If non-NULL, ops->convert_msg will be called after a data message is
* If non-NULL, ops->convert_msg will be called after a data message is
* decrypted.
*
* If "contextp" is not NULL, it will be set to the ConnContext used for
* If "contextp" is not NULL, it will be set to the ConnContext used for
* receiving the message.
*
* If otrl_message_receiving returns 1, then the message you received
......
......@@ -443,7 +443,7 @@ static gcry_error_t otrl_sm_proof_know_log(gcry_mpi_t *c, gcry_mpi_t *d,
}
/*
* Verify a proof of knowledge of a discrete logarithm.
* Verify a proof of knowledge of a discrete logarithm.
* Checks that c = h(g^d x^c)
*/
static int otrl_sm_check_know_log(const gcry_mpi_t c, const gcry_mpi_t d,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment