MCPcopy Create free account
hub / github.com/adobe/Marinus / __get_raw_version

Method __get_raw_version

python3_cron_scripts/libs3/X509Parser.py:795–805  ·  view source on GitHub ↗

The public_bytes version returns with the BEGIN/END headers. This function returns just the base64 encoded data

(self, cert)

Source from the content-addressed store, hash-verified

793 self.__get_certificate_transparency(cert_object, cert)
794
795 def __get_raw_version(self, cert):
796 """
797 The public_bytes version returns with the BEGIN/END headers.
798 This function returns just the base64 encoded data
799 """
800 full_text = cert.public_bytes(Encoding.PEM).decode("utf-8")
801 temp_string = full_text[full_text.index("\n") + 1 :]
802 temp_string = temp_string[: temp_string.rfind("\n")]
803 temp_string = temp_string[: temp_string.rfind("\n")]
804 final_string = temp_string.replace("\n", "")
805 return final_string
806
807 def __check_self_signed(self, cert_object, cert):
808 """

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected