Commit d53fec04 authored by Antonin Décimo's avatar Antonin Décimo Committed by Juliusz Chroboczek

Use AUTH_TYPE_* consistently.

parent a1afd51b
...@@ -116,7 +116,7 @@ compute_hmac(const unsigned char *src, const unsigned char *dst, ...@@ -116,7 +116,7 @@ compute_hmac(const unsigned char *src, const unsigned char *dst,
DO_HTONS(port, (unsigned short)protocol_port); DO_HTONS(port, (unsigned short)protocol_port);
switch(key->type) { switch(key->type) {
case 1: { case AUTH_TYPE_SHA256: {
SHA256Context inner, outer; SHA256Context inner, outer;
unsigned char ipad[64], ihash[32], opad[64]; unsigned char ipad[64], ihash[32], opad[64];
if(key->len != 32) if(key->len != 32)
...@@ -174,7 +174,7 @@ compute_hmac(const unsigned char *src, const unsigned char *dst, ...@@ -174,7 +174,7 @@ compute_hmac(const unsigned char *src, const unsigned char *dst,
return -1; return -1;
return 32; return 32;
} }
case 2: { case AUTH_TYPE_BLAKE2S: {
blake2s_state s; blake2s_state s;
if(key->len != 16) if(key->len != 16)
return -1; 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