Commit c0951b34 authored by Martin Prudek's avatar Martin Prudek

Unify bytes-string conversion

parent 3839367f
...@@ -21,7 +21,7 @@ def get_common_names(csr): ...@@ -21,7 +21,7 @@ def get_common_names(csr):
def csr_from_str(csr_str): def csr_from_str(csr_str):
try: try:
# construct x509 request from PEM string # construct x509 request from PEM string
csr_data = bytes(csr_str, encoding='utf-8') csr_data = csr_str.encode("utf-8")
csr = x509.load_pem_x509_csr( csr = x509.load_pem_x509_csr(
data=csr_data, data=csr_data,
backend=default_backend() backend=default_backend()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment