fix osmo_auth_gen_vec_auts: copy rand to auth vector

Related: OS#1593
Change-Id: If943731a78089f0aac3d55245de80596d01314a4
This commit is contained in:
Neels Hofmeyr 2017-02-21 19:54:36 +01:00
parent 3a5ca647c5
commit 3b8cb39e7c
1 changed files with 8 additions and 1 deletions

View File

@ -188,11 +188,18 @@ int osmo_auth_gen_vec_auts(struct osmo_auth_vector *vec,
const uint8_t *_rand)
{
struct osmo_auth_impl *impl = selected_auths[aud->algo];
int rc;
if (!impl || !impl->gen_vec_auts)
return -ENOENT;
return impl->gen_vec_auts(vec, aud, auts, rand_auts, _rand);
rc = impl->gen_vec_auts(vec, aud, auts, rand_auts, _rand);
if (rc < 0)
return rc;
memcpy(vec->rand, _rand, sizeof(vec->rand));
return 0;
}
static const struct value_string auth_alg_vals[] = {