arekinath / PivApplet

PIV applet for JavaCard 2.2.2 and 3.0.4+ with full ECDSA/ECDH support
111 stars 37 forks source link

Fix Non-ExtLen build and negative serial numbers #25

Closed ProfFan closed 4 years ago

ProfFan commented 5 years ago

This PR avoids negative serials displayed by Yubikey-PIV-Tool :)

darconeous commented 4 years ago

Have a look at #28 and #15: it appears that setting the most significant bit was intentional.

arekinath commented 4 years ago

As @darconeous mentioned, the negative numbers in serials are deliberate. If it's causing software to crash or misbehave rather than just looking weird I'd be open to setting the second-highest bit instead, but so far I think it's mostly ok?

At some point I'll do #31 to allow setting a specific serial number for the applet to use. For now I'm going to close this PR out.