#29 koji-ssl-admin: pkcs12 password must be bytes
Merged 5 years ago by tkopecek. Opened 5 years ago by ktdreyer.
ktdreyer/koji-tools ssl-admin-password-bytes  into  master

file modified
+1 -1
@@ -344,7 +344,7 @@ 

      with open(pkcs12_path, 'rb') as f:

          if pkcs12:

              backend = default_backend()

-             pkcs12.load_key_and_certificates(f.read(), 'koji', backend)

+             pkcs12.load_key_and_certificates(f.read(), b'koji', backend)

  

  

  def server_csr(args):

In the latest python-cryptography releases, the openssl backend's load_key_and_certificates_from_pkcs12() method expect a bytes object. The cryptography library raises:

  TypeError: password must be bytes-like

Pass in the "koji" password as a bytestring.

Is it ok with py2 version? Or should we use six.b('koji') instead?

This particular tool is py3 only, #!/usr/bin/python3

Commit e437953 fixes this pull-request

Pull-Request has been merged by tkopecek

5 years ago

Pull-Request has been merged by tkopecek

5 years ago
Metadata