The output of the openssl
command looks like this:
serial=CABCSDUMMY4A168847703FGH
notAfter=Oct 21 16:43:47 2024 GMT
subject= /C=US/ST=WA/L=Seattle/O=MyCo/OU=TME/CN=MyCo.example.com
How do I convert this string to JSON?
I tried these:
temp_txt_bytes = subprocess.check_output (["openssl", "x509", "-serial", "-enddate", "-subject", "-noout", "-in", pem_file_name])
temp_txt_strings = temp_txt_bytes.decode("utf-8")
test = json.loads(temp_txt_strings) #json.parse, json.dump, and json.load also failing