RE: GINA - exception in winlogon

From: Johnny Liu (Liu_at_discussions.microsoft.com)
Date: 10/16/05

  • Next message: Hao Zhuang [MSFT]: "Re: CryptVerifyCertificateSignature fails with NTE_BAD_SIGNATURE"
    Date: Sun, 16 Oct 2005 14:07:01 -0700
    
    

    > Hi,
    >
    > As I said in another posts I have written a own GINA that hooks in the
    > exisitng MSGINA, as ginahook does.
    >
    > I am trying to make logon via smart card on win Xp. I have achieved that my
    > GINA can receive the SAS notification events, by following this article:
    >
    > http://support.microsoft.com/default.aspx?scid=kb;en-us;843541#kb1
    >
    > and by adding these lines in my wlxinitialize function:
    >
    >
    > DWORD oldValue;
    > ((PWLX_DISPATCH_VERSION_1_3)
    > g_pWinlogon)->WlxSetOption(hWlx,WLX_OPTION_USE_SMART_CARD, TRUE, &oldValue);
    >
    > ((PWLX_DISPATCH_VERSION_1_3)
    > g_pWinlogon)->WlxGetOption(hWlx,WLX_OPTION_USE_SMART_CARD, &oldValue);
    >
    > ((PWLX_DISPATCH_VERSION_1_3)
    > g_pWinlogon)->WlxGetOption(hWlx,WLX_OPTION_SMART_CARD_PRESENT, &oldValue);
    >
    >
    > I really dont know why, but it works with them...
    >
    > The problem now, is that when I insert or extract the smart card,
    > winlogon.exe throws an exception... somethg like this:
    >
    >
    > access violation writing location 0x00000000
    > first exception in 0x7c81eb33 in winlogon.exe: microsoft C++ exception:
    > unsigned long @ 0x012dfdb0
    >
    >
    > then, in the logon dialog, when you enter the PIN, winlogon does not give
    > the control to GINA, so i cant make the logon....I think the exceptions have
    > some relation with this problem, but im not sure.
    >
    > Could u help me??
    >
    > Thans in advance and sorry for my poor english!!

    You have to know the behavior of MSGina very well, then you will know what
    shall you do in each exported function. If your gina send smart card insert
    event by WlxSasNotify correctly, Winlogon will call WlxLoggedOutSAS with
    dwSasType = WLX_SAS_TYPE_SC_INSERT. If you didn't do anything and direct pass
    to MSGina, MSGina will create a dialog for gather PIN from user. After user
    press the button "OK" of this dialog, MSGina search available Authentication
    Package by LSA support function "LsaLookupAuthenticationPackage", to search
    an Authentication Package which can handles and authenticates inserted smart
    card with entered PIN. If you don't write and register an Authentication
    Package for your smart card, MSGina is not able to find usable Authentication
    Package for inserted card, so MSGina will pop a message box for notice and
    then return WLX_SAS_ACTION_NONE directly, MSGina will not pass entered PIN
    number back to your Gina. And the exception case is not cause by this
    condition, I believe it has something wrong on your code.

    I saw you had posted "GINA - SmartCard logon on win XP" on 10/11/2005, are
    you sure that the smart card logon function has all implemented completely on
    Win2K version? or only work on receiving SAS notification?

    Johnny
    johnny_liu@inmax.com.tw


  • Next message: Hao Zhuang [MSFT]: "Re: CryptVerifyCertificateSignature fails with NTE_BAD_SIGNATURE"
  • Quantcast