int ewindow_size; /* sync mode event window size (right side value) */
int rwindow_size; /* softfail override event window size */
int rwindow_delay; /* softfail override max time delay */
+ int site_transform; /* apply site transform to challenge? (undoc) */
int debug; /* print debug info? */
#if defined(FREERADIUS)
/* freeradius-specific items */
ssize_t chal_len;
/* Perform any site-specific transforms of the challenge. */
- if ((chal_len = otp_challenge_transform(username,
- challenge, opt->chal_len)) < 0) {
- otp_log(OTP_LOG_ERR, "%s: %s: challenge transform failed for [%s]",
- log_prefix, __func__, username);
- rc = OTP_RC_SERVICE_ERR;
- goto auth_done_service_err;
- /* NB: state not updated. */
+ if (opt->site_transform) {
+ if ((chal_len = otp_challenge_transform(username,
+ challenge, opt->chal_len)) < 0) {
+ otp_log(OTP_LOG_ERR, "%s: %s: challenge transform failed for [%s]",
+ log_prefix, __func__, username);
+ rc = OTP_RC_SERVICE_ERR;
+ goto auth_done_service_err;
+ /* NB: state not updated. */
+ }
+ } else {
+ chal_len = opt->chal_len;
}
/* Calculate the async response. */
{ "mschap_mppe_bits", PW_TYPE_INTEGER,
offsetof(otp_option_t, mschap_mppe_types), NULL, "2" },
+ { "site_transform", PW_TYPE_BOOLEAN, offsetof(otp_option_t, site_transform),
+ NULL, "yes" },
{ "debug", PW_TYPE_BOOLEAN, offsetof(otp_option_t, debug),
NULL, "no" },