Thanks Seán!
Yes, I was in doubt which noreg- label to choose. noreg-sqe seems to be
more appropriate, so I set it.
Sincerely yours,
Ivan
On 19.05.2014 13:30, Seán Coffey wrote:
Hopefully a member of the security team can help review this Ivan. It
looks good to me. I'm not sure if QA run any smart card tests on mac -
doesn't look like it! It could be worth following up with them to
ensure they add this to their test configurations.
One note on the 'noreg-existing' label. It's not one of the official
ones from the openJDK developer doc [1]. There's quite a few
occurrences of it though. I'd suggest something like 'noreg-sqe'. You
already have a pointer to the testcase in the bug report.
regards,
Sean.
On 16/05/14 16:54, Ivan Gerasimov wrote:
Hello!
It was reported that CardTerminal.isCardPresent(),
CardTerminal.waitForCardAbsent(...) and
CardTerminal.waitForCardPresent(...) do not work correctly on Mac OS X.
It is due to the difference in the types of the fields of
SCARD_READERSTATE structure used across different platforms.
In addition to the field type correction, it is also needed to make
sure the fields are aligned correctly.
I made sure that the total size of the structure (61 bytes) is
correct by requesting information about the same reader twice:
(had to mess with
sun.security.smartcardio.PCSC.SCardGetStatusChange() a bit to check,
but didn't include it the test).
No new tests go with the fix.
The already existing manual test
jdk/test/sun/security/smartcardio/TestPresent.java can be used to
demonstrate the bug with the current jdk.
With the fix this test isn't failing.
I assume that the correct behavior in the case of several card
readers can be checked with
jdk/test/sun/security/smartcardio/TestMultiplePresent.java, but
cannot check it myself as I don't currently have access to a mac comp
with more than one readers.
Would you please help review the fix?
BUGURL: https://bugs.openjdk.java.net/browse/JDK-7195480
WEBREV: http://cr.openjdk.java.net/~igerasim/7195480/0/webrev/
Sincerely yours,
Ivan