From a00729ff7421b3661e8b1a1e0fa46393379f2e96 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Mon, 8 Feb 2016 16:33:07 -0700 Subject: Import patches-unapplied version 2.1.3-0ubuntu1 to ubuntu/xenial-proposed Imported using git-ubuntu import. Changelog parent: 53f54030cae2de3d5fa474a61fe51f16c7a07c79 New changelog entries: * New upstream release (LP: #1543359): - Bug fixes for extension handling - Feature enablement for AzureStack. --- azurelinuxagent/utils/textutil.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'azurelinuxagent/utils/textutil.py') diff --git a/azurelinuxagent/utils/textutil.py b/azurelinuxagent/utils/textutil.py index e0f1395..851f98a 100644 --- a/azurelinuxagent/utils/textutil.py +++ b/azurelinuxagent/utils/textutil.py @@ -224,5 +224,13 @@ def gen_password_hash(password, crypt_id, salt_len): salt = "${0}${1}".format(crypt_id, salt) return crypt.crypt(password, salt) +def get_bytes_from_pem(pem_str): + base64_bytes = "" + for line in pem_str.split('\n'): + if "----" not in line: + base64_bytes += line + return base64_bytes + + Version = LooseVersion -- cgit v1.2.3