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
91c44f82
Commit
91c44f82
authored
May 31, 2021
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename blake2s to blake2s128.
parent
dda8d637
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
babeld.man
babeld.man
+3
-3
configuration.c
configuration.c
+3
-3
configuration.h
configuration.h
+1
-1
hmac.c
hmac.c
+1
-1
No files found.
babeld.man
View file @
91c44f82
...
@@ -318,7 +318,7 @@ This specifies smallest (highest) rule priority used with source-specific
...
@@ -318,7 +318,7 @@ This specifies smallest (highest) rule priority used with source-specific
routes. The default is 100.
routes. The default is 100.
.TP
.TP
.BI "key id" " id" " type " \c
.BI "key id" " id" " type " \c
.RB { hmac-sha256 | blake2s } \c
.RB { hmac-sha256 | blake2s
128
} \c
.BI " value" " value"
.BI " value" " value"
Configure a key for use with the
Configure a key for use with the
.B key
.B key
...
@@ -327,13 +327,13 @@ interface option. The
...
@@ -327,13 +327,13 @@ interface option. The
is one of
is one of
.B hmac-sha256
.B hmac-sha256
or
or
.BR blake2s .
.BR blake2s
128
.
The
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 ,
up to 32 bytes for
up to 32 bytes for
.BR blake2s ).
.BR blake2s
128
).
.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:
.IP
.IP
...
...
configuration.c
View file @
91c44f82
...
@@ -784,8 +784,8 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return)
...
@@ -784,8 +784,8 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return)
key
->
type
=
AUTH_TYPE_NONE
;
key
->
type
=
AUTH_TYPE_NONE
;
}
else
if
(
strcmp
(
auth_type
,
"hmac-sha256"
)
==
0
)
{
}
else
if
(
strcmp
(
auth_type
,
"hmac-sha256"
)
==
0
)
{
key
->
type
=
AUTH_TYPE_SHA256
;
key
->
type
=
AUTH_TYPE_SHA256
;
}
else
if
(
strcmp
(
auth_type
,
"blake2s"
)
==
0
)
{
}
else
if
(
strcmp
(
auth_type
,
"blake2s
128
"
)
==
0
)
{
key
->
type
=
AUTH_TYPE_BLAKE2S
;
key
->
type
=
AUTH_TYPE_BLAKE2S
128
;
}
else
{
}
else
{
fprintf
(
stderr
,
"Key type '%s' isn't supported.
\n
"
,
auth_type
);
fprintf
(
stderr
,
"Key type '%s' isn't supported.
\n
"
,
auth_type
);
free
(
auth_type
);
free
(
auth_type
);
...
@@ -830,7 +830,7 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return)
...
@@ -830,7 +830,7 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return)
}
}
break
;
break
;
}
}
case
AUTH_TYPE_BLAKE2S
:
case
AUTH_TYPE_BLAKE2S
128
:
if
(
key
->
len
<
1
||
key
->
len
>
32
)
{
if
(
key
->
len
<
1
||
key
->
len
>
32
)
{
fprintf
(
stderr
,
"Key length is %d, expected 1 to 32.
\n
"
,
fprintf
(
stderr
,
"Key length is %d, expected 1 to 32.
\n
"
,
key
->
len
);
key
->
len
);
...
...
configuration.h
View file @
91c44f82
...
@@ -31,7 +31,7 @@ THE SOFTWARE.
...
@@ -31,7 +31,7 @@ THE SOFTWARE.
#define AUTH_TYPE_NONE 0
#define AUTH_TYPE_NONE 0
#define AUTH_TYPE_SHA256 1
#define AUTH_TYPE_SHA256 1
#define AUTH_TYPE_BLAKE2S 2
#define AUTH_TYPE_BLAKE2S
128
2
struct
filter_result
{
struct
filter_result
{
unsigned
int
add_metric
;
/* allow = 0, deny = INF, metric = <0..INF> */
unsigned
int
add_metric
;
/* allow = 0, deny = INF, metric = <0..INF> */
...
...
hmac.c
View file @
91c44f82
...
@@ -171,7 +171,7 @@ compute_hmac(const unsigned char *src, const unsigned char *dst,
...
@@ -171,7 +171,7 @@ compute_hmac(const unsigned char *src, const unsigned char *dst,
return
-
1
;
return
-
1
;
return
32
;
return
32
;
}
}
case
AUTH_TYPE_BLAKE2S
:
{
case
AUTH_TYPE_BLAKE2S
128
:
{
blake2s_state
s
;
blake2s_state
s
;
if
(
key
->
len
>
32
)
if
(
key
->
len
>
32
)
return
-
1
;
return
-
1
;
...
...
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