Made it simpler to run cert.
This commit is contained in:
1 parent
ba4771aeee
commit
8531b330dc
16 files changed
+163
-48
No files matched your search
@@ -49,6 +49,17 @@ bool is_expired(const string& expiration) {
|
||||
std::tuple<string, string> load_session_keys(const string& session) {
|
||||
using namespace boost::filesystem;
|
||||
auto path = bts::config::get<bts::config::System>().data_path() + "glbx_logon/";
|
||||
|
||||
// we try to make it easier to run cert by copying the cert secure
|
||||
// logon file to the right place if in dev
|
||||
if (!is_directory(path) && config::get<config::DeploymentType>().type()=="dev") {
|
||||
auto cert_file=os::sparkd_wd() + "/data_files/cert_secure_logon.txt" ;
|
||||
if (exists(cert_file)) {
|
||||
create_directories(path);
|
||||
copy_file(cert_file, path+"/cert_secure_logon.txt");
|
||||
}
|
||||
}
|
||||
|
||||
if (is_directory(path)) {
|
||||
// iterate though each file
|
||||
directory_iterator end;
|
||||
@@ -75,6 +86,7 @@ std::tuple<string, string> load_session_keys(const string& session) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string error = "Failed to find secure logon key for session: " + session;
|
||||
bts_assert_msg(false, error);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user