diff --git a/certbot/client.py b/certbot/client.py index cc2f31d56..c015cd175 100644 --- a/certbot/client.py +++ b/certbot/client.py @@ -299,7 +299,7 @@ class Client(object): # We've been asked to reuse a specific existing private key. # Therefore, we'll read it now and not generate a new one in # either case below. - with open(old_keypath, "r") as f: + with open(old_keypath, "rb") as f: keypath = old_keypath keypem = f.read() key = util.Key(file=keypath, pem=keypem) # type: Optional[util.Key]