Hi Andrew,
Thanks for the very detailed explanation. I was able to reproduce it. May I ask you to try this patch?
diff --git a/src/maascli/cli.py b/src/maascli/cli.py index 47a62c82f..dfe921018 100644 --- a/src/maascli/cli.py +++ b/src/maascli/cli.py @@ -98,7 +98,7 @@ class cmd_login(Command): if options.cacerts is not None: cacerts = options.cacerts.read() try: - crypto.load_certificate(crypto.FILETYPE_PEM, cacerts) + crypto.load_certificate(crypto.FILETYPE_PEM, cacerts.encode('utf-8')) except crypto.Error: raise CommandError("Invalid PEM material")
Hi Andrew,
Thanks for the very detailed explanation. I was able to reproduce it.
May I ask you to try this patch?
diff --git a/src/maascli/ cli.py b/src/maascli/ cli.py .dfe921018 100644 cli.py cli.py
cacerts = options. cacerts. read() load_certificat e(crypto. FILETYPE_ PEM, cacerts) load_certificat e(crypto. FILETYPE_ PEM, cacerts. encode( 'utf-8' ))
raise CommandError( "Invalid PEM material")
index 47a62c82f.
--- a/src/maascli/
+++ b/src/maascli/
@@ -98,7 +98,7 @@ class cmd_login(Command):
if options.cacerts is not None:
try:
- crypto.
+ crypto.
except crypto.Error: