diff options
author | Martin Willi <martin@revosec.ch> | 2012-07-09 15:33:41 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2012-07-16 14:55:06 +0200 |
commit | 8bd6a30af1b745f65f60130d4735df05096e07ce (patch) | |
tree | 8834701cea8764fb47281ea533096ec5dcc20b81 /src/libradius/radius_socket.c | |
parent | ce73fc19dbc36d089e595e452356deccd8afcd6f (diff) | |
download | strongswan-8bd6a30af1b745f65f60130d4735df05096e07ce.tar.bz2 strongswan-8bd6a30af1b745f65f60130d4735df05096e07ce.tar.xz |
Add a return value to hasher_t.get_hash()
Diffstat (limited to 'src/libradius/radius_socket.c')
-rw-r--r-- | src/libradius/radius_socket.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libradius/radius_socket.c b/src/libradius/radius_socket.c index 3113ffff8..ba7cb14b0 100644 --- a/src/libradius/radius_socket.c +++ b/src/libradius/radius_socket.c @@ -260,8 +260,11 @@ static chunk_t decrypt_mppe_key(private_radius_socket_t *this, u_int16_t salt, while (c < C.ptr + C.len) { /* b(i) = MD5(S + c(i-1)) */ - this->hasher->get_hash(this->hasher, this->secret, NULL); - this->hasher->get_hash(this->hasher, seed, p); + if (!this->hasher->get_hash(this->hasher, this->secret, NULL) || + !this->hasher->get_hash(this->hasher, seed, p)) + { + return chunk_empty; + } /* p(i) = b(i) xor c(1) */ memxor(p, c, HASH_SIZE_MD5); |