Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
Tor
Commits
45a3f6b9
Commit
45a3f6b9
authored
21 years ago
by
Roger Dingledine
Browse files
Options
Downloads
Patches
Plain Diff
more pesky tabs
svn:r1265
parent
87797bcd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/common/crypto.c
+5
-5
5 additions, 5 deletions
src/common/crypto.c
src/common/crypto.h
+3
-3
3 additions, 3 deletions
src/common/crypto.h
src/common/fakepoll.c
+1
-1
1 addition, 1 deletion
src/common/fakepoll.c
src/common/util.c
+5
-5
5 additions, 5 deletions
src/common/util.c
with
14 additions
and
14 deletions
src/common/crypto.c
+
5
−
5
View file @
45a3f6b9
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
src/common/crypto.h
+
3
−
3
View file @
45a3f6b9
...
...
@@ -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 */
...
...
This diff is collapsed.
Click to expand it.
src/common/fakepoll.c
+
1
−
1
View file @
45a3f6b9
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/common/util.c
+
5
−
5
View file @
45a3f6b9
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment