IPassportCrypt::put_Site
IPassportCrypt::put_Site
Sets the key being used by the current Passport Crypt object by referring to the site name label assigned to that key when the key was first installed. This site name should match the site name used for configuration settings in the Passport Manager Administration utility. This property should be used only if your site has multiple keys installed because there are multiple sites being served by common Passport Manager installations.
Syntax
HRESULT put_Site( BSTR bstrSiteName );
Parameters
- bstrSiteName
[in] A BSTR that matches the site label given when a key was first installed. To determine how to establish this name, see the documentation that came with each key installation executable file. The procedure for installing keys varies somewhat between versions and thus will not be covered here. Site names are also visible in the Passport Manager Administration utility.
Return values
Returns one of the following values:
S_OK Success. E_OUTOFMEMORY Could not allocate memory for a copy string.
Remarks
Setting keys for Passport Crypt object has no effect whatsoever on the keys used for Ticket and Profile decryption by the Passport Manager object. The Passport Manager object loads the key for the current request either by determining host name through Active Server Pages (ASP) objects (through the built-in OnStartPage) or through the structures passed to equivalent Passport Manager ISAPI-targeted application programming interfaces (APIs).
put_Site might be used for ISAPI because the Passport Crypt object will not be calling the built-in OnStartPage method that sets the key for the current host request when operating through ASP. Thus, the correct host or site name must be determined and then set as a property in order to assure that the Passport Crypt object is working in the correct key. put_Site can be used to deliberately set the current Passport Crypt object's key to a value other than that which corresponds to the current request. A site might do this in cases in which Passport Crypt objects are being used to encrypt and exchange private data intra-site using only one of the site's keys as the master, or in which the Passport Crypt object was established in application or session scope and thus cannot determine the host of the current connection.
See Also