|
|
|
|
|
|
|
|
InitAuthentication = (NULL==Authentication)?"":Authentication; |
|
|
InitAuthentication = (NULL==Authentication)?"":Authentication; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
|
|
//// IMPORTANT: If the authentication string is provided in the initialize() it
|
|
|
|
|
|
//// MUST NOT be put into D.node_authentication.
|
|
|
|
|
|
//*****************************************************************************
|
|
|
|
|
|
|
|
|
//// When the license ID and security string come from an OEM application they
|
|
|
//// When the license ID and security string come from an OEM application they
|
|
|
//// may not appear in the configuration files. If that is the case we will assume
|
|
|
//// may not appear in the configuration files. If that is the case we will assume
|
|
|
//// that they developer wants to keep the security string secret by encrypting it
|
|
|
//// that they developer wants to keep the security string secret by encrypting it
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string SecurityKeyDisplayString(snfCFGData& D) { // Returns appropriate SecurityKey: data
|
|
|
string SecurityKeyDisplayString(snfCFGData& D) { // Returns appropriate SecurityKey: data
|
|
|
string ConfigLogSecurityKey = "************************"; // Start with a masked display.
|
|
|
string ConfigLogSecurityKey = "************************"; // Start with a masked display.
|
|
|
if(0 < D.node_licenseid.length()) { // If auth info is in the config files then
|
|
|
|
|
|
|
|
|
if(0 < D.node_authentication.length()) { // If auth info is in the config files then
|
|
|
ConfigLogSecurityKey = D.node_licenseid + D.node_authentication; // build up the key from that data so it
|
|
|
ConfigLogSecurityKey = D.node_licenseid + D.node_authentication; // build up the key from that data so it
|
|
|
} // can be displayed in the config log.
|
|
|
} // can be displayed in the config log.
|
|
|
return ConfigLogSecurityKey;
|
|
|
return ConfigLogSecurityKey;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//// The SecurityKey is built from the licenseID and the Authentication |
|
|
//// The SecurityKey is built from the licenseID and the Authentication |
|
|
|
|
|
|
|
|
if(InitLicenseIdIsProvided) { // If the LicenseID has been provided then |
|
|
|
|
|
CFGData.SecurityKey = InitLicenseId; // the first part of our security key is that. |
|
|
|
|
|
|
|
|
if(InitLicenseIdIsProvided) { // If the LicenseID is OEM provided then |
|
|
|
|
|
CFGData.SecurityKey = InitLicenseId; // the first part of our security key is that.
|
|
|
|
|
|
CFGData.node_licenseid = InitLicenseId; // Also override any file-loaded license ID. |
|
|
} else { // If it was not provided then we will get |
|
|
} else { // If it was not provided then we will get |
|
|
CFGData.SecurityKey = CFGData.node_licenseid; // the LicenseID from our config file. |
|
|
CFGData.SecurityKey = CFGData.node_licenseid; // the LicenseID from our config file. |
|
|
} |
|
|
} |