Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
43a0066f
Commit
43a0066f
authored
May 31, 2021
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow Blake2s keys up to 32 bytes.
parent
375ea5ff
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
babeld.man
babeld.man
+1
-1
configuration.c
configuration.c
+3
-3
hmac.c
hmac.c
+1
-1
No files found.
babeld.man
View file @
43a0066f
...
@@ -332,7 +332,7 @@ The
...
@@ -332,7 +332,7 @@ The
.B value
.B value
is a hexadecimal string (up to 64 bytes for
is a hexadecimal string (up to 64 bytes for
.BR hmac-sha256 ,
.BR hmac-sha256 ,
exactly 16
bytes for
up to 32
bytes for
.BR blake2s ).
.BR blake2s ).
.SS Interface configuration
.SS Interface configuration
An interface is configured by a line with the following format:
An interface is configured by a line with the following format:
...
...
configuration.c
View file @
43a0066f
...
@@ -831,9 +831,9 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return)
...
@@ -831,9 +831,9 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return)
break
;
break
;
}
}
case
AUTH_TYPE_BLAKE2S
:
case
AUTH_TYPE_BLAKE2S
:
if
(
key
->
len
!=
16
)
{
if
(
key
->
len
<
1
||
key
->
len
>
32
)
{
fprintf
(
stderr
,
"Key length is %d, expected
%d
.
\n
"
,
fprintf
(
stderr
,
"Key length is %d, expected
1 to 32
.
\n
"
,
key
->
len
,
16
);
key
->
len
);
goto
error
;
goto
error
;
}
}
break
;
break
;
...
...
hmac.c
View file @
43a0066f
...
@@ -173,7 +173,7 @@ compute_hmac(const unsigned char *src, const unsigned char *dst,
...
@@ -173,7 +173,7 @@ compute_hmac(const unsigned char *src, const unsigned char *dst,
}
}
case
AUTH_TYPE_BLAKE2S
:
{
case
AUTH_TYPE_BLAKE2S
:
{
blake2s_state
s
;
blake2s_state
s
;
if
(
key
->
len
!=
16
)
if
(
key
->
len
>
32
)
return
-
1
;
return
-
1
;
rc
=
blake2s_init_key
(
&
s
,
16
,
key
->
value
,
key
->
len
);
rc
=
blake2s_init_key
(
&
s
,
16
,
key
->
value
,
key
->
len
);
if
(
rc
<
0
)
if
(
rc
<
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment