This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 194048 - Problems with GUI setting AID, can't set large PIX with full 11 hex digits
Summary: Problems with GUI setting AID, can't set large PIX with full 11 hex digits
Status: RESOLVED FIXED
Alias: None
Product: javacard
Classification: Unclassified
Component: Java Card (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: issues@mobility
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-05 13:09 UTC by Benjamin_Gittins
Modified: 2011-01-05 20:35 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin_Gittins 2011-01-05 13:09:52 UTC
Hi!

I am trying to set the PIX to 11 hex digits (22 nibbles) in length.
Unfortunately, the GUI is complaining that the PIX is too long.

//aid/rid/pix

The maximum PIX i can set is 5 bytes

//aid/1122334455/1122334455  <-- WORKS

When i set 6 bytes, it says: "Pix too long - must be 0-11 bytes".

//aid/1122334455/112233445566  <-- ERROR  

I should be able to set:

//aid/1122334455/112233445566778899AABB  <-- ERROR

I think what is happening is the routine for checking the RID (5 bytes) is also being used to check PIX. It's possible somebody did a cut-and-paste of the code and forgot to change the boundary constant from 5 to 11.

This problem occurs in the New File wizard when i create a new classic applet.
This problem also occurs in the Project Properties window under Build - Packaging.
I am not sure if it also occurs else-where.

** This is a pretty important bug as I use PIX's long than 5 bytes in length. **

Hopefully it should be easy to fix.

Thanks! 

Benjamin Gittins
http://www.ictgozomalta.eu
Comment 1 _ tboudreau 2011-01-05 19:25:53 UTC
This issue was automatically assigned to me, however I'm no longer a Sun/Oracle employee.

However, I'm pretty sure I saw a fix for exactly this issue committed into source in the last month or so - I still watch commits into the javacard tools.  It was simply an issue of not multiplying the number of bytes by 2 when counting the number of characters before it was invalid.  And if not fixed, all code that validates PIXen is in one place, so it can be fixed globally.

Anyway, I believe it is fixed in newer builds.  If not, let me know here, including what part of the GUI you're entering the AID on, and I'll try to fix it - as far as I know I still have commit rights.
Comment 2 Benjamin_Gittins 2011-01-05 20:15:58 UTC
Hi!

(In reply to comment #1)
> This issue was automatically assigned to me, however I'm no longer a Sun/Oracle
> employee.
> 
Oh. Thank you for Responding. Much appreciated. Do you know if someone else has been assigned to continue working on the Java Card 3 support?

> However, I'm pretty sure I saw a fix for exactly this issue committed into
> source in the last month or so - I still watch commits into the javacard tools.
>  It was simply an issue of not multiplying the number of bytes by 2 when
> counting the number of characters before it was invalid.  And if not fixed, all
> code that validates PIXen is in one place, so it can be fixed globally.
> 
> Anyway, I believe it is fixed in newer builds.  

I am using: NetBeans IDE 6.9.1 (Build 201011082200)
The javacard plugin reports
Version: 1.3 Source: NetBeans, NetBeans IDE 6.9.1 (Build 201011082200)

I tried using "updates" tab in the Plugins window, no luck.
I have done a clean install from scratch.

> If not, let me know here,
> including what part of the GUI you're entering the AID on, and I'll try to fix
> it - as far as I know I still have commit rights.

This problem occurs in the New File wizard when i create a new classic applet.
This problem also occurs in the Project Properties window under Build -
Packaging.
Comment 3 Benjamin_Gittins 2011-01-05 20:34:33 UTC
 
> > However, I'm pretty sure I saw a fix for exactly this issue committed into
> > source in the last month or so - I still watch commits into the javacard tools.
> >  It was simply an issue of not multiplying the number of bytes by 2 when
> > counting the number of characters before it was invalid.  And if not fixed, all
> > code that validates PIXen is in one place, so it can be fixed globally.
> > 
> > Anyway, I believe it is fixed in newer builds.  
> 
The problem appears to be fixed in IDE 7.0 beta.

Thanks!!!!!
Comment 4 Benjamin_Gittins 2011-01-05 20:35:01 UTC
Thank you!