Coder Social home page Coder Social logo

Comments (6)

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Hi,

Do you have an example test that causes this problem to occur?

Thanks,
Glen

Original comment by [email protected] on 20 Dec 2012 at 2:08

  • Changed state: Accepted

from yubico-yubiserve.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
I tried applying your patch, and running the test script, which is located in 
the testing directory, in SVN.  The test script performs a number of actions.

I found that when I update the statement to:
if not self.CRC() or not self.isCRCValid():

The test fails. oddly with no output from the curl command, rather than the 
expected output or an error.  So, changing this if statement, might be exposing 
a bug somewhere else.

Not sure why yet.

Original comment by [email protected] on 2 Jan 2013 at 11:01

from yubico-yubiserve.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
I've got the test running in my environment now.  I believe the crash you are 
seeing is because OTPValidation::isCRCValid is looking at self.crc, but should 
be looking at self.OTPcrc instead, since OTPValidation::CRC sets self.OTPcrc, 
not self.crc (maybe to avoid confusion between self.crc as a property and 
self.CRC as a method).

Even with that and the other changes I suggested, I get BAD_OTP, so I'm going 
to run through some of the CRC calculations by hand to see what's going on.

Original comment by [email protected] on 2 Jan 2013 at 8:02

from yubico-yubiserve.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Ok, I've got a patch file here that makes the test pass.  My previous test 
accidentally omitted the crc = crc ^ (b & 0xff) change.

Original comment by [email protected] on 2 Jan 2013 at 8:08

Attachments:

from yubico-yubiserve.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Here is a patch for basic_test.sh that includes a new test that should come up 
with BAD_OTP due to an incorrect CRC.  Using the old code, it comes up with 
REPLAYED_OTP.

Original comment by [email protected] on 2 Jan 2013 at 9:25

Attachments:

from yubico-yubiserve.

GoogleCodeExporter avatar GoogleCodeExporter commented on September 26, 2024
Good work.  Both patches applied to SVN, revision 55.   Thank you.

Original comment by [email protected] on 7 Jan 2013 at 3:20

  • Changed state: Fixed

from yubico-yubiserve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.