RFR [8046343] (smartcardio) CardTerminal.connect('direct') does not work on MacOSX
Sean Mullan
sean.mullan at oracle.com
Tue Jul 15 15:27:57 UTC 2014
I would also get Valerie's review before you push this since she is more
familiar with this area, but I have a couple of comments:
1. Please add an appropriate noreg label to the bug.
2. The code on lines 65-69 introduces an undesirable dependency on
sun.security.action for the JDK 9 modularization work. Please replace
this with a nested PrivilegedAction subclass, or a lambda expression
instead:
AccessController.doPrivileged((PrivilegedAction<String>) () ->
System.getProperty("os.name"));
(plus you will need to write some additional code to convert that to a
boolean.)
--Sean
On 07/14/2014 11:08 AM, Ivan Gerasimov wrote:
> Hello!
>
> It was reported that trying to use DIRECT as the preferred protocol
> results in the CardException to get thrown under MacOSX.
> It turn out to be a problem of pcscd-lite implementation of the API:
> From the source code [1] it can be seen that the SCardConnect()
> function expects its argument dwPreferredProtocol to be non-zero.
> Windows driver normally accepts zeros [2].
>
> Could you please help review the fix?
>
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8046343
> WEBREV: http://cr.openjdk.java.net/~igerasim/8046343/0/webrev/
>
> Sincerely yours,
> Ivan
>
> [1]
> http://pcsc-lite.sourcearchive.com/documentation/1.2.9-beta9-1/winscard__clnt_8c-source.html
>
> [2]
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa379473(v=vs.85).aspx
>
>
More information about the security-dev
mailing list