gcontini
2020-11-22 0fd661591e85bbf730bb274a56961432bceb7071
src/library/locate/EnvironmentVarData.cpp
@@ -16,7 +16,7 @@
#include "../base/base64.h"
#include "../base/EventRegistry.h"
#include "../base/StringUtils.h"
#include "../base/string_utils.h"
namespace license {
namespace locate {
@@ -46,15 +46,14 @@
}
const std::string EnvironmentVarData::retrieve_license_content(const std::string &licenseLocation) const {
   string tmpVal = getenv(LCC_LICENSE_LOCATION_ENV_VAR);
   string env_val = getenv(LCC_LICENSE_LOCATION_ENV_VAR);
   if (isBase64) {
      int flen = 0;
      unsigned char *raw = unbase64(tmpVal.c_str(), tmpVal.length(), &flen);
      string str = string(reinterpret_cast<char *>(raw));
      free(raw);
      vector<uint8_t> data = unbase64(env_val);
      string str = string(reinterpret_cast<char *>(data.data()));
      return str;
   }
   return tmpVal;
   return env_val;
}
}  // namespace locate