import from branch_1_1:
authorfcusack <fcusack>
Sat, 1 Jul 2006 00:14:58 +0000 (00:14 +0000)
committerfcusack <fcusack>
Sat, 1 Jul 2006 00:14:58 +0000 (00:14 +0000)
fix (reverse) selection of challenge and response vp's

src/modules/rlm_otp/otp_pw_valid.c

index e4ed5ef..4611b3a 100644 (file)
@@ -94,8 +94,8 @@ otp_pw_valid(REQUEST *request, int pwe, const char *challenge,
   otp_request.pwe.pwe = pwe;
 
   /* otp_pwe_present() (done by caller) guarantees that both of these exist */
-  rvp = pairfind(request->packet->vps, pwattr[pwe - 1]);
-  cvp = pairfind(request->packet->vps, pwattr[pwe]);
+  cvp = pairfind(request->packet->vps, pwattr[pwe - 1]);
+  rvp = pairfind(request->packet->vps, pwattr[pwe]);
 
   /*
    * Validate available vps based on pwe type.