GetLogonCredentialsFromSmartcard

(Engine-Level Function)

Description: Monitors the card reader for a smartcard and reads the certificate information from it. If Multiple usable certificates are found (useable defined as the presence of subject alternate name field), It will spawn a windows certificate selector and use the certificate returned by that.
Warning: This function should be used only by advanced programmers.
Returns:

Boolean. Set to TRUE if a card was present.

Outputs the Marshalled credential of the certificate, the UPN, and the sha1 hash of the certificate in the parameters.

Usage: Script Only.
Function Groups: Security
Related to: WindowsLogon
Format: GetLogonCredentialsFromSmartcard(MarshalledCredential, Username, Sha1)
Parameters:  
MarshalledCredential
Required. The marshalled credential used with WindowsLogon
Username
Required text. A variable in which the username found in the certificate will be returned in UPN format (e.g. a.user@example.com). This is not a VTScada user name.
Sha1
Required. A variable in which the variable the Sha1 hash of the certificate will be returned.
Comments: Only one instance of the function should be run on a system at once. Having multiple instances of the function can result in multiple certificate dialogs spawning for a single card insertion event. The function monitors the card reader in its own thread, so it doesn’t cause any blocking.