mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
more pesky tabs
svn:r1265
This commit is contained in:
parent
87797bcde5
commit
45a3f6b97c
@ -1047,14 +1047,14 @@ int crypto_seed_rng()
|
||||
if (!provider_set) {
|
||||
if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL, 0)) {
|
||||
if (GetLastError() != NTE_BAD_KEYSET) {
|
||||
log_fn(LOG_ERR,"Can't get CryptoAPI provider [1]");
|
||||
return -1;
|
||||
log_fn(LOG_ERR,"Can't get CryptoAPI provider [1]");
|
||||
return -1;
|
||||
}
|
||||
/* Yes, we need to try it twice. */
|
||||
if (!CryptAcquireContext(&provider, NULL, NULL, PROV_RSA_FULL,
|
||||
CRYPT_NEWKEYSET)) {
|
||||
log_fn(LOG_ERR,"Can't get CryptoAPI provider [2]");
|
||||
return -1;
|
||||
CRYPT_NEWKEYSET)) {
|
||||
log_fn(LOG_ERR,"Can't get CryptoAPI provider [2]");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
provider_set = 1;
|
||||
|
@ -74,10 +74,10 @@ typedef struct crypto_dh_env_st {
|
||||
crypto_dh_env_t *crypto_dh_new();
|
||||
int crypto_dh_get_bytes(crypto_dh_env_t *dh);
|
||||
int crypto_dh_get_public(crypto_dh_env_t *dh, char *pubkey_out,
|
||||
int pubkey_out_len);
|
||||
int pubkey_out_len);
|
||||
int crypto_dh_compute_secret(crypto_dh_env_t *dh,
|
||||
char *pubkey, int pubkey_len,
|
||||
char *secret_out, int secret_out_len);
|
||||
char *pubkey, int pubkey_len,
|
||||
char *secret_out, int secret_out_len);
|
||||
void crypto_dh_free(crypto_dh_env_t *dh);
|
||||
|
||||
/* symmetric crypto */
|
||||
|
@ -32,7 +32,7 @@
|
||||
int
|
||||
tor_poll(struct pollfd *ufds, unsigned int nfds, int timeout)
|
||||
{
|
||||
unsigned int idx;
|
||||
unsigned int idx;
|
||||
int maxfd, fd;
|
||||
int r;
|
||||
#ifdef MS_WINDOWS
|
||||
|
@ -527,9 +527,9 @@ int check_private_dir(const char *dirname, int create)
|
||||
}
|
||||
log(LOG_INFO, "Creating directory %s", dirname);
|
||||
#ifdef MS_WINDOWS
|
||||
r = mkdir(dirname);
|
||||
r = mkdir(dirname);
|
||||
#else
|
||||
r = mkdir(dirname, 0700);
|
||||
r = mkdir(dirname, 0700);
|
||||
#endif
|
||||
if (r) {
|
||||
log(LOG_WARN, "Error creating directory %s: %s", dirname,
|
||||
@ -877,12 +877,12 @@ int tor_inet_aton(const char *c, struct in_addr* addr)
|
||||
uint32_t r;
|
||||
assert(c && addr);
|
||||
if (strcmp(c, "255.255.255.255") == 0) {
|
||||
addr->s_addr = 0xFFFFFFFFu;
|
||||
return 1;
|
||||
addr->s_addr = 0xFFFFFFFFu;
|
||||
return 1;
|
||||
}
|
||||
r = inet_addr(c);
|
||||
if (r == INADDR_NONE)
|
||||
return 0;
|
||||
return 0;
|
||||
addr->s_addr = r;
|
||||
return 1;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user