Lines Matching refs:tr
107 TOKENDB_Rec tr; in tokenchallenge() local
115 tokendb_getrec(user, &tr) == 0 && in tokenchallenge()
116 (tr.mode & TOKEN_RIM)) { in tokenchallenge()
118 while ((r = tokendb_lockrec(user, &tr, TOKEN_LOCKED)) == 1) { in tokenchallenge()
123 tr.flags &= ~TOKEN_LOCKED; in tokenchallenge()
124 if (r == 0 && tr.rim[0]) { in tokenchallenge()
125 h2cb(tr.secret, &cb); in tokenchallenge()
128 DES_ecb_encrypt(&tr.rim, &cb.cb, &ks, DES_ENCRYPT); in tokenchallenge()
129 memcpy(tr.rim, cb.cb, 8); in tokenchallenge()
131 if ((tr.rim[r] &= 0xf) > 9) in tokenchallenge()
132 tr.rim[r] -= 10; in tokenchallenge()
133 tr.rim[r] |= 0x30; in tokenchallenge()
136 memcpy(tokennumber.ct, tr.rim, 8); in tokenchallenge()
138 tokendb_putrec(user, &tr); in tokenchallenge()
141 if (r != 0 || tr.rim[0] == '\0') { in tokenchallenge()
146 memcpy(tr.rim, tokennumber.ct, 8); in tokenchallenge()
147 tokendb_putrec(user, &tr); in tokenchallenge()