tpazderka: EOL replacement in certificate read.

This commit is contained in:
Roland Hedberg
2014-10-02 16:05:23 +02:00
parent 13fdda52ab
commit 4e65a0b881

View File

@@ -664,7 +664,8 @@ def read_cert_from_file(cert_file, cert_type):
return ""
if cert_type == "pem":
line = read_file(cert_file).split("\n")
line = open(cert_file).read().replace("\r\n", "\n").split("\n")
if line[0] == "-----BEGIN CERTIFICATE-----":
line = line[1:]
elif line[0] == "-----BEGIN PUBLIC KEY-----":