http://bugs.winehq.org/show_bug.cgi?id=58608
Bug ID: 58608 Summary: SCardTransmit should work with pioSendPci=NULL Product: Wine Version: 10.13 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winscard Assignee: wine-bugs@winehq.org Reporter: pq2sx44teeigl7za@chyen.cc Distribution: ---
Although undocumented, winscard.dll on Windows appears to accept pioSendPci=NULL for SCardTransmit. Such usage is observed in Taipei Fubon Bank's agent program. Steps to reproduce are:
1. Download and install https://ebank.taipeifubon.com.tw/EXT/inc/plugins/TfbWebATMServiceInstall.exe 2. Run C:\Program Files (x86)\TFB\WebATM\TFBWebATMAgent.exe 3. Go to https://ebank.taipeifubon.com.tw/EXT/common/CWA/Index.faces and try to login ("登入" button)
http://bugs.winehq.org/show_bug.cgi?id=58608
--- Comment #1 from yan12125 pq2sx44teeigl7za@chyen.cc --- Created attachment 79148 --> http://bugs.winehq.org/attachment.cgi?id=79148 Crash report
http://bugs.winehq.org/show_bug.cgi?id=58608
--- Comment #2 from yan12125 pq2sx44teeigl7za@chyen.cc --- Created attachment 79149 --> http://bugs.winehq.org/attachment.cgi?id=79149 Proof-of-concept patch
One idea is querying the protocol to use if pioSendPci=NULL. Note that this patch was tested with older wine. I'll rebase and retest when I have time.
http://bugs.winehq.org/show_bug.cgi?id=58608
--- Comment #3 from Hans Leidekker hans@meelstraat.net --- Created attachment 79152 --> http://bugs.winehq.org/attachment.cgi?id=79152 patch
Thanks for the bug report. Here's an alternative patch that caches the protocol and avoids the SCardStatusW() call. Does it also fix your application?
http://bugs.winehq.org/show_bug.cgi?id=58608
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch
http://bugs.winehq.org/show_bug.cgi?id=58608
--- Comment #4 from yan12125 pq2sx44teeigl7za@chyen.cc --- Thank you! The idea looks cool. I'll test and feedback when I find time.
By the way, I noticed a potential issue after reading my patch again. Per [1], cbPciLength is "Length, in bytes, of the SCARD_IO_REQUEST structure plus any following PCI-specific information." Assume no PCI-specific information, sizeof(SCARD_IO_REQUEST) seems more correct. I don't remember why I used 0 - will test both variants based on your patch.
http://bugs.winehq.org/show_bug.cgi?id=58608
--- Comment #5 from Hans Leidekker hans@meelstraat.net --- (In reply to yan12125 from comment #4)
Thank you! The idea looks cool. I'll test and feedback when I find time.
By the way, I noticed a potential issue after reading my patch again. Per [1], cbPciLength is "Length, in bytes, of the SCARD_IO_REQUEST structure plus any following PCI-specific information." Assume no PCI-specific information, sizeof(SCARD_IO_REQUEST) seems more correct. I don't remember why I used 0 - will test both variants based on your patch.
Right, I have already fixed that here.