mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-14 07:03:44 +01:00
Clean up whitespace
This commit is contained in:
parent
6617822b84
commit
3310dd2358
@ -2710,3 +2710,4 @@ setup_openssl_threading(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ logv(int severity, log_domain_mask_t domain, const char *funcname,
|
|||||||
|
|
||||||
/** Output a message to the log. It gets logged to all logfiles that
|
/** Output a message to the log. It gets logged to all logfiles that
|
||||||
* care about messages with <b>severity</b> in <b>domain</b>. The content
|
* care about messages with <b>severity</b> in <b>domain</b>. The content
|
||||||
* if formatted printf style
|
* is formatted printf style basedc on <b>format</b> and extra arguments.
|
||||||
* */
|
* */
|
||||||
void
|
void
|
||||||
tor_log(int severity, log_domain_mask_t domain, const char *format, ...)
|
tor_log(int severity, log_domain_mask_t domain, const char *format, ...)
|
||||||
@ -406,8 +406,8 @@ tor_log(int severity, log_domain_mask_t domain, const char *format, ...)
|
|||||||
/** Output a message to the log, prefixed with a function name <b>fn</b>. */
|
/** Output a message to the log, prefixed with a function name <b>fn</b>. */
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
/** GCC-based implementation of the log_fn backend, used when we have
|
/** GCC-based implementation of the log_fn backend, used when we have
|
||||||
* variadic macros. All arguments are as for log_fn, except for <b>fn</b>, which
|
* variadic macros. All arguments are as for log_fn, except for
|
||||||
* is the name of the calling functions. */
|
* <b>fn</b>, which is the name of the calling functions. */
|
||||||
void
|
void
|
||||||
_log_fn(int severity, log_domain_mask_t domain, const char *fn,
|
_log_fn(int severity, log_domain_mask_t domain, const char *fn,
|
||||||
const char *format, ...)
|
const char *format, ...)
|
||||||
|
@ -384,12 +384,14 @@ test_crypto_pk(void)
|
|||||||
/* Now try signing. */
|
/* Now try signing. */
|
||||||
strlcpy(data1, "Ossifrage", 1024);
|
strlcpy(data1, "Ossifrage", 1024);
|
||||||
test_eq(128, crypto_pk_private_sign(pk1, data2, sizeof(data2), data1, 10));
|
test_eq(128, crypto_pk_private_sign(pk1, data2, sizeof(data2), data1, 10));
|
||||||
test_eq(10, crypto_pk_public_checksig(pk1, data3, sizeof(data3), data2, 128));
|
test_eq(10,
|
||||||
|
crypto_pk_public_checksig(pk1, data3, sizeof(data3), data2, 128));
|
||||||
test_streq(data3, "Ossifrage");
|
test_streq(data3, "Ossifrage");
|
||||||
/* Try signing digests. */
|
/* Try signing digests. */
|
||||||
test_eq(128, crypto_pk_private_sign_digest(pk1, data2, sizeof(data2),
|
test_eq(128, crypto_pk_private_sign_digest(pk1, data2, sizeof(data2),
|
||||||
data1, 10));
|
data1, 10));
|
||||||
test_eq(20, crypto_pk_public_checksig(pk1, data3, sizeof(data3), data2, 128));
|
test_eq(20,
|
||||||
|
crypto_pk_public_checksig(pk1, data3, sizeof(data3), data2, 128));
|
||||||
test_eq(0, crypto_pk_public_checksig_digest(pk1, data1, 10, data2, 128));
|
test_eq(0, crypto_pk_public_checksig_digest(pk1, data1, 10, data2, 128));
|
||||||
test_eq(-1, crypto_pk_public_checksig_digest(pk1, data1, 11, data2, 128));
|
test_eq(-1, crypto_pk_public_checksig_digest(pk1, data1, 11, data2, 128));
|
||||||
|
|
||||||
|
@ -748,11 +748,11 @@ test_dir_v3_networkstatus(void)
|
|||||||
sign_skey_leg1 = pk_generate(4);
|
sign_skey_leg1 = pk_generate(4);
|
||||||
|
|
||||||
test_assert(!crypto_pk_read_private_key_from_string(sign_skey_1,
|
test_assert(!crypto_pk_read_private_key_from_string(sign_skey_1,
|
||||||
AUTHORITY_SIGNKEY_1, -1));
|
AUTHORITY_SIGNKEY_1, -1));
|
||||||
test_assert(!crypto_pk_read_private_key_from_string(sign_skey_2,
|
test_assert(!crypto_pk_read_private_key_from_string(sign_skey_2,
|
||||||
AUTHORITY_SIGNKEY_2, -1));
|
AUTHORITY_SIGNKEY_2, -1));
|
||||||
test_assert(!crypto_pk_read_private_key_from_string(sign_skey_3,
|
test_assert(!crypto_pk_read_private_key_from_string(sign_skey_3,
|
||||||
AUTHORITY_SIGNKEY_3, -1));
|
AUTHORITY_SIGNKEY_3, -1));
|
||||||
|
|
||||||
test_assert(!crypto_pk_cmp_keys(sign_skey_1, cert1->signing_key));
|
test_assert(!crypto_pk_cmp_keys(sign_skey_1, cert1->signing_key));
|
||||||
test_assert(!crypto_pk_cmp_keys(sign_skey_2, cert2->signing_key));
|
test_assert(!crypto_pk_cmp_keys(sign_skey_2, cert2->signing_key));
|
||||||
|
Loading…
Reference in New Issue
Block a user