def get_cainfo(self):
"""Query the ca service information.
Args:
Returns: The base64 encoded CA PEM file content for the caname
"""
if self._ca_name != "":
body_data = {"caname": self._ca_name}
else:
body_data = {}
response = self._send_ca_post(path="cainfo", json=body_data)
_logger.debug("Raw response json {0}".format(response))
if (response['success'] and response['result']['CAName']
== self._ca_name):
return base64.b64decode(response['result']['CAChain'])
else:
raise ValueError("get_cainfo failed with errors {0}"
.format(response['errors']))
评论列表
文章目录