In otp_client_process(), call cb->set_as_key() later in the function
after the OTP request has been created. The previous position of this
call caused the AS key to be replaced even when later code in the
function failed, preventing other preauth mechanisms from retrieving
the correct AS key.
ticket: 8421 (new)
target_version: 1.14-new
target_version: 1.13-new
tags: pullup
if (as_key == NULL)
return ENOENT;
- /* Use FAST armor key as response key. */
- retval = cb->set_as_key(context, rock, as_key);
- if (retval != 0)
- return retval;
-
/* Attempt to get token selection from the responder. */
pin = empty_data();
value = empty_data();
if (retval != 0)
goto error;
+ /* Use FAST armor key as response key. */
+ retval = cb->set_as_key(context, rock, as_key);
+ if (retval != 0)
+ goto error;
+
/* Encode the request into the pa_data output. */
retval = set_pa_data(req, pa_data_out);
error: