Skip to content

Commit

Permalink
Fix incorrect ssl-ca checking
Browse files Browse the repository at this point in the history
  • Loading branch information
jardon authored and DnPlas committed Aug 3, 2022
1 parent c02d3ae commit 3859a66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def _get_ssl_volume_config(self):
"key": "PUBLIC_CRT",
},
]
if self.model.config["ssl-ca"] is not None:
if self.model.config["ssl-ca"] != "":
files.append({"path": "CAs/root.cert", "key": "ROOT_CERT"})
return {
"name": "minio-ssl",
Expand All @@ -278,7 +278,7 @@ def _get_ssl_secret(self):
"PRIVATE_KEY": self.model.config["ssl-key"],
"PUBLIC_CRT": self.model.config["ssl-cert"],
}
if self.model.config["ssl-ca"] is not None:
if self.model.config["ssl-ca"] != "":
data["ROOT_CERT"] = b64decode(self.model.config["ssl-ca"])
return {
"name": "minio-ssl",
Expand Down

0 comments on commit 3859a66

Please sign in to comment.