#define WEOF (wchar_t)(0xFFFF)
#endif
#if defined(HAVE_DECL_SECUREZEROMEMORY) && !HAVE_DECL_SECUREZEROMEMORY
-static inline void SecureZeroMemory(PVOID ptr, SIZE_T cnt)
+static inline void
+SecureZeroMemory(PVOID ptr, SIZE_T cnt)
{
volatile char *vcptr = (volatile char*)ptr;
while (cnt--)
#error "No implementation for tor_getpass found!"
#endif
}
+
/* Check the most basic possible sanity via the test secret/public key pair
* used in "Cryptography in NaCl - 2. Secret keys and public keys". This
- * may catch catastrophic failures on systems where Curve25519 is expensive,
+ * may catch catastrophic failures on systems where Curve25519 is expensive,
* without requiring a ton of key generation.
*/
curve25519_use_ed = 1;
size_t string_max = 0;
if (max_bytes_to_read+1 >= SIZE_T_CEILING) {
- errno = EINVAL;
+ errno = EINVAL;
return NULL;
}
STMT_BEGIN log_warn(LD_CONFIG, args, ##__VA_ARGS__); STMT_END
#endif
-
/** Log a warning message iff <b>filepath</b> is not absolute.
* Warning message must contain option name <b>option</b> and
* an absolute path that <b>filepath<b> will resolve to.
*e = entry;
}
-end:
+ end:
return ret;
}
number_stored++;
goto advance;
-skip:
+ skip:
rend_service_descriptor_free(parsed);
-advance:
+ advance:
/* advance to next descriptor, if available. */
current_desc = next_desc;
/* check if there is a next descriptor. */
}
return RCS_OKAY;
-okay:
+ okay:
if (entry) {
*entry = e;
}
retval = RCS_OKAY;
-err:
+ err:
rend_service_descriptor_free(parsed);
tor_free(intro_content);
return retval;
}
+
size_t rend_cache_get_total_allocation(void);
#endif /* TOR_RENDCACHE_H */
+
* it right. */
}
-
if (secret_len != ED25519_SECKEY_LEN) {
log_err(LD_OR, "%s is corrupted.", fname);
saved_errno = EINVAL;
}
}
-
if (tokenize_string(area, s, start_of_next_microdesc, tokens,
microdesc_token_table, flags)) {
log_warn(LD_DIR, "Unparseable microdescriptor");
p = 16;
libscrypt_retval =
- libscrypt_scrypt((const uint8_t *)"password", 0,
- (const uint8_t *)"NaCl", 0,
+ libscrypt_scrypt((const uint8_t *)"password", 0,
+ (const uint8_t *)"NaCl", 0,
r, N, p, buf1, dk_len);
openssl_retval =
EVP_PBE_scrypt((const char *)"password", 0,
memset(buf2,0,64);
r = 1048576;
-
+
libscrypt_retval =
- libscrypt_scrypt((const uint8_t *)"pleaseletmein", 0,
- (const uint8_t *)"SodiumChloride", 0,
+ libscrypt_scrypt((const uint8_t *)"pleaseletmein", 0,
+ (const uint8_t *)"SodiumChloride", 0,
N, r, p, buf1, dk_len);
openssl_retval =
EVP_PBE_scrypt((const char *)"pleaseletmein", 0,