Skip to content

Commit

Permalink
fix segfault in app profile when vault address not found
Browse files Browse the repository at this point in the history
  • Loading branch information
AO-StreetArt committed Jun 23, 2018
1 parent 3d37712 commit 97aba21
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aossl/profile/include/tiered_app_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,10 @@ class TieredApplicationProfile: public SafeApplicationProfile{
std::string consul_token_vault_key = ApplicationProfile::get_app_name() + std::string("ConsulToken");
StringBuffer consul_cert_buf;
StringBuffer consul_token_buf;
get_vault_secret(vault, consul_cert_vault_key, consul_cert_buf);
get_vault_secret(vault, consul_token_vault_key, consul_token_buf);
if (vault) {
get_vault_secret(vault, consul_cert_vault_key, consul_cert_buf);
get_vault_secret(vault, consul_token_vault_key, consul_token_buf);
}

// Check Env Variables for Consul Information
const char *env_consul_value = std::getenv("AOSSL_CONSUL_ADDRESS");
Expand Down

0 comments on commit 97aba21

Please sign in to comment.