+def _check_certificate_data(name: str, content: str):
+ if not name or not content:
+ raise ValueError("certificate name and content must be a non-empty string")
+
+
+def _extract_certificates(certs_config: str):
+ certificates = {}
+ if certs_config:
+ cert_list = certs_config.split(",")
+ for cert in cert_list:
+ name, content = cert.split(":")
+ _check_certificate_data(name, content)
+ certificates[name] = content
+ return certificates
+
+
+def decode(content: str):
+ return base64.b64decode(content.encode("utf-8")).decode("utf-8")
+
+