And use_privatekey_file
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py
index 990a370..3570ffb 100644
--- a/OpenSSL/SSL.py
+++ b/OpenSSL/SSL.py
@@ -441,6 +441,10 @@
         :param filetype: (optional) The encoding of the file, default is PEM
         :return: None
         """
+        if isinstance(keyfile, _text_type):
+            # Perhaps sys.getfilesystemencoding() could be better?
+            keyfile = keyfile.encode("utf-8")
+
         if not isinstance(keyfile, bytes):
             raise TypeError("keyfile must be a byte string")