… | |
… | |
954 | |
954 | |
955 | rsachallenge chg; |
955 | rsachallenge chg; |
956 | |
956 | |
957 | if (!rsa_cache.find (p->id, chg)) |
957 | if (!rsa_cache.find (p->id, chg)) |
958 | { |
958 | { |
959 | slog (L_ERR, _("%s(%s): unrequested auth response"), |
959 | slog (L_ERR, _("%s(%s): unrequested auth response ignored"), |
960 | conf->nodename, (const char *)rsi); |
960 | conf->nodename, (const char *)rsi); |
961 | break; |
961 | break; |
962 | } |
962 | } |
963 | else |
963 | else |
964 | { |
964 | { |
965 | crypto_ctx *cctx = new crypto_ctx (chg, 0); |
965 | crypto_ctx *cctx = new crypto_ctx (chg, 0); |
966 | |
966 | |
967 | if (!p->hmac_chk (cctx)) |
967 | if (!p->hmac_chk (cctx)) |
|
|
968 | { |
968 | slog (L_ERR, _("%s(%s): hmac authentication error on auth response, received invalid packet\n" |
969 | slog (L_ERR, _("%s(%s): hmac authentication error on auth response, received invalid packet\n" |
969 | "could be an attack, or just corruption or an synchronization error"), |
970 | "could be an attack, or just corruption or an synchronization error"), |
970 | conf->nodename, (const char *)rsi); |
971 | conf->nodename, (const char *)rsi); |
|
|
972 | break; |
|
|
973 | } |
971 | else |
974 | else |
972 | { |
975 | { |
973 | rsaresponse h; |
976 | rsaresponse h; |
974 | |
977 | |
975 | rsa_hash (p->id, chg, h); |
978 | rsa_hash (p->id, chg, h); |