Giter VIP home page Giter VIP logo

Comments (4)

drallgood avatar drallgood commented on May 29, 2024

Thanks for your report.
Should be fixed now.
I've pushed a new snapshot to our repository so that you'll get the fixed version as soon as your maven fetches it.

from jpasskit.

teastburn avatar teastburn commented on May 29, 2024

Thanks for the quick update! Unfortunately I'm afraid the date still doesn't work. The bugs do not appear to be on the jpasskit side, but may need to be dealt with anyways if relevantDate is to be supported. Apple claims it expects a W3C formatted date (ISO 8601): http://www.w3.org/TR/NOTE-datetime.

Actual:
"relevantDate": "2012-10-04T05:00:00.000+0000"

"Expected":
"relevantDate": "2012-10-04T05:00:00+00:00"

There are two bugs:

  1. Apple does not allow seconds in decimal notation. The W3C specification says it's OK, but passes won't load.
  2. Java uses the RFC 822 spec for it's timezone format, which is incorrect according to the W3C spec. Timezone must have a colon between the hours and seconds.

Perhaps down the road it may be best to allow the user to supply a date format somehow? Just a thought.

Thanks again!

from jpasskit.

drallgood avatar drallgood commented on May 29, 2024

Damn. You are right.

Allowing a custom date format isn't such a good idea as the format should be exactly what Apple defined it. Too much room for errors.

The PKSigningUtil is meant to be a shortcut for the people who just want to get going. They have always the possibility to just use the basic classes and do it on their own. Or just use some of its functionality while doing other parts differently. That's why I kept the other classes as clean and basic as possible.

Should be fairly easy to fix, though. Just a custom date formatter for jackson.

from jpasskit.

teastburn avatar teastburn commented on May 29, 2024

Nice! Worked for me. A simple timezone test also worked. Cheers.

from jpasskit.

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.