Do not convert password to bytes for correct python3 support

This commit is contained in:
Sergi Almacellas Abellana 2018-05-10 15:45:43 +02:00
parent bee1ee1a86
commit 1966a78a1d
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ class LoadPKCS12(Wizard):
(company,) = Company.browse([company_id])
with BytesIO(self.start.pfx) as pfx:
try:
pkcs12 = load_pkcs12(pfx.read(), bytes(self.start.password))
pkcs12 = load_pkcs12(pfx.read(), self.start.password)
crt = dump_certificate(FILETYPE_PEM, pkcs12.get_certificate())
key = dump_privatekey(FILETYPE_PEM, pkcs12.get_privatekey())
Company.write([company], {