Commit 91c44f82 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Rename blake2s to blake2s128.

parent dda8d637
......@@ -318,7 +318,7 @@ This specifies smallest (highest) rule priority used with source-specific
routes. The default is 100.
.TP
.BI "key id" " id" " type " \c
.RB { hmac-sha256 | blake2s } \c
.RB { hmac-sha256 | blake2s128 } \c
.BI " value" " value"
Configure a key for use with the
.B key
......@@ -327,13 +327,13 @@ interface option. The
is one of
.B hmac-sha256
or
.BR blake2s .
.BR blake2s128 .
The
.B value
is a hexadecimal string (up to 64 bytes for
.BR hmac-sha256 ,
up to 32 bytes for
.BR blake2s ).
.BR blake2s128 ).
.SS Interface configuration
An interface is configured by a line with the following format:
.IP
......
......@@ -784,8 +784,8 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return)
key->type = AUTH_TYPE_NONE;
} else if(strcmp(auth_type, "hmac-sha256") == 0) {
key->type = AUTH_TYPE_SHA256;
} else if(strcmp(auth_type, "blake2s") == 0) {
key->type = AUTH_TYPE_BLAKE2S;
} else if(strcmp(auth_type, "blake2s128") == 0) {
key->type = AUTH_TYPE_BLAKE2S128;
} else {
fprintf(stderr, "Key type '%s' isn't supported.\n", auth_type);
free(auth_type);
......@@ -830,7 +830,7 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return)
}
break;
}
case AUTH_TYPE_BLAKE2S:
case AUTH_TYPE_BLAKE2S128:
if(key->len < 1 || key->len > 32) {
fprintf(stderr, "Key length is %d, expected 1 to 32.\n",
key->len);
......
......@@ -31,7 +31,7 @@ THE SOFTWARE.
#define AUTH_TYPE_NONE 0
#define AUTH_TYPE_SHA256 1
#define AUTH_TYPE_BLAKE2S 2
#define AUTH_TYPE_BLAKE2S128 2
struct filter_result {
unsigned int add_metric; /* allow = 0, deny = INF, metric = <0..INF> */
......
......@@ -171,7 +171,7 @@ compute_hmac(const unsigned char *src, const unsigned char *dst,
return -1;
return 32;
}
case AUTH_TYPE_BLAKE2S: {
case AUTH_TYPE_BLAKE2S128: {
blake2s_state s;
if(key->len > 32)
return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment