From 6420da336083d936da9a4563149b08d785d70c84 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 20 Apr 2020 17:48:17 +0900 Subject: Fix gate job failures and py3 compatibility - Fix incorrect type handling of secret payload in py3 (it should be bytes instead of str by default) - Fix py3 compatibility of test codes - Update expiration date so that resources are created with valid expiration. Change-Id: I4935f601f87e9c49499da1034a320eee2e655b4d --- .zuul.yaml | 5 +- barbicanclient/barbican_cli/v1/acls.py | 4 +- barbicanclient/barbican_cli/v1/secrets.py | 11 +- barbicanclient/v1/secrets.py | 18 +- functionaltests/cli/v1/behaviors/acl_behaviors.py | 2 +- functionaltests/cli/v1/behaviors/base_behaviors.py | 3 +- .../cli/v1/behaviors/container_behaviors.py | 2 +- .../cli/v1/behaviors/secret_behaviors.py | 15 +- functionaltests/cli/v1/smoke/test_secret.py | 4 +- functionaltests/client/v1/functional/test_acl.py | 2 +- .../client/v1/functional/test_containers.py | 12 +- .../client/v1/functional/test_orders.py | 4 +- .../client/v1/functional/test_secrets.py | 22 +- functionaltests/client/v1/smoke/test_containers.py | 10 +- functionaltests/client/v1/smoke/test_secrets.py | 10 +- functionaltests/common/keys.py | 320 ++++++++++----------- 16 files changed, 227 insertions(+), 217 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 5185467..fbf99c8 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -14,10 +14,7 @@ templates: - check-requirements - openstack-lower-constraints-jobs - - openstack-python-jobs - - openstack-python35-jobs - - openstack-python36-jobs - - openstack-python37-jobs + - openstack-python3-ussuri-jobs - openstackclient-plugin-jobs - publish-openstack-docs-pti check: diff --git a/barbicanclient/barbican_cli/v1/acls.py b/barbicanclient/barbican_cli/v1/acls.py index 80faf01..b438698 100644 --- a/barbicanclient/barbican_cli/v1/acls.py +++ b/barbicanclient/barbican_cli/v1/acls.py @@ -75,8 +75,8 @@ class ArgMixin(object): def get_acls_as_lister(self, acl_entity): """Gets per operation ACL data in expected format for lister command""" - map(lambda acl: setattr(acl, 'columns', acl_entity.columns), - acl_entity.operation_acls) + for acl in acl_entity.operation_acls: + setattr(acl, 'columns', acl_entity.columns) return acls.ACLFormatter._list_objects(acl_entity.operation_acls) diff --git a/barbicanclient/barbican_cli/v1/secrets.py b/barbicanclient/barbican_cli/v1/secrets.py index dca35aa..dc9929d 100644 --- a/barbicanclient/barbican_cli/v1/secrets.py +++ b/barbicanclient/barbican_cli/v1/secrets.py @@ -73,8 +73,13 @@ class GetSecret(show.ShowOne): if parsed_args.file: if os.path.exists(parsed_args.file): raise ValueError("ERROR: file already exists.") + + # String should be encoded to bytes in Python3 + secret = data[0].encode('utf-8') if isinstance(data[0], str) \ + else data[0] + with open(parsed_args.file, 'wb') as f: - f.write(data[0]) + f.write(secret) else: super(GetSecret, self).produce_output( @@ -182,8 +187,10 @@ class StoreSecret(show.ShowOne): with open(args.file, 'rb') as f: data = f.read() + payload = args.payload.encode('utf-8') if args.payload else data + entity = self.app.client_manager.key_manager.secrets.create( - name=args.name, payload=args.payload or data, + name=args.name, payload=payload, payload_content_type=args.payload_content_type, payload_content_encoding=args.payload_content_encoding, algorithm=args.algorithm, bit_length=args.bit_length, diff --git a/barbicanclient/v1/secrets.py b/barbicanclient/v1/secrets.py index a604160..f4bc7ad 100644 --- a/barbicanclient/v1/secrets.py +++ b/barbicanclient/v1/secrets.py @@ -292,14 +292,13 @@ class Secret(SecretFormatter): 'expiration': self.expiration } - if self.payload == '': - raise exceptions.PayloadException("Invalid Payload: " - "Cannot Be Empty String") + if self.payload is not None: + if not isinstance(self.payload, (six.text_type, six.binary_type)): + raise exceptions.PayloadException("Invalid Payload Type") - if self.payload is not None and not isinstance(self.payload, - (six.text_type, - six.binary_type)): - raise exceptions.PayloadException("Invalid Payload Type") + if not len(self.payload): + raise exceptions.PayloadException("Invalid Payload: " + "Cannot Be Empty String") if self.payload_content_type or self.payload_content_encoding: ''' @@ -308,7 +307,10 @@ class Secret(SecretFormatter): for backwards compatibility and should be removed in a future release. ''' - secret_dict['payload'] = self.payload + if type(self.payload) is six.binary_type: + secret_dict['payload'] = self.payload.decode('utf-8') + else: + secret_dict['payload'] = self.payload secret_dict['payload_content_type'] = self.payload_content_type secret_dict['payload_content_encoding'] = ( self.payload_content_encoding diff --git a/functionaltests/cli/v1/behaviors/acl_behaviors.py b/functionaltests/cli/v1/behaviors/acl_behaviors.py index 443ace7..a9fc506 100644 --- a/functionaltests/cli/v1/behaviors/acl_behaviors.py +++ b/functionaltests/cli/v1/behaviors/acl_behaviors.py @@ -15,7 +15,7 @@ import logging -import base_behaviors +from functionaltests.cli.v1.behaviors import base_behaviors class ACLBehaviors(base_behaviors.BaseBehaviors): diff --git a/functionaltests/cli/v1/behaviors/base_behaviors.py b/functionaltests/cli/v1/behaviors/base_behaviors.py index 4d24c5b..1c81723 100644 --- a/functionaltests/cli/v1/behaviors/base_behaviors.py +++ b/functionaltests/cli/v1/behaviors/base_behaviors.py @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. """ -import exceptions as exc import logging import re import six @@ -88,7 +87,7 @@ class BaseBehaviors(object): self.cmdline_client.stdout = six.StringIO() self.cmdline_client.stderr = six.StringIO() self.cmdline_client.run(argv) - except exc.SystemExit: + except SystemExit: pass outstr = self.cmdline_client.stdout.getvalue() diff --git a/functionaltests/cli/v1/behaviors/container_behaviors.py b/functionaltests/cli/v1/behaviors/container_behaviors.py index 1db4a1f..8df8180 100644 --- a/functionaltests/cli/v1/behaviors/container_behaviors.py +++ b/functionaltests/cli/v1/behaviors/container_behaviors.py @@ -15,7 +15,7 @@ import logging -import base_behaviors +from functionaltests.cli.v1.behaviors import base_behaviors class ContainerBehaviors(base_behaviors.BaseBehaviors): diff --git a/functionaltests/cli/v1/behaviors/secret_behaviors.py b/functionaltests/cli/v1/behaviors/secret_behaviors.py index 9522871..733da3a 100644 --- a/functionaltests/cli/v1/behaviors/secret_behaviors.py +++ b/functionaltests/cli/v1/behaviors/secret_behaviors.py @@ -15,7 +15,7 @@ import logging -import base_behaviors +from functionaltests.cli.v1.behaviors import base_behaviors class SecretBehaviors(base_behaviors.BaseBehaviors): @@ -54,7 +54,7 @@ class SecretBehaviors(base_behaviors.BaseBehaviors): self.secret_hrefs_to_delete.remove(secret_href) - def store_secret(self, payload="Payload for testing", store_argv=[]): + def store_secret(self, payload=b"Payload for testing", store_argv=[]): """Store (aka create) a secret The store_argv parameter allows additional command line parameters for @@ -68,6 +68,11 @@ class SecretBehaviors(base_behaviors.BaseBehaviors): """ argv = ['secret', 'store'] self.add_auth_and_endpoint(argv) + + if payload is not None and not isinstance(payload, str): + # Payload shouldn't be bytes but string on Python3 + payload = payload.decode('utf-8') + argv.extend(['--payload', payload]) argv.extend(store_argv) @@ -197,9 +202,9 @@ class SecretBehaviors(base_behaviors.BaseBehaviors): :param filename: name of file to write :return contents of the file """ - with open(filename, "r") as myfile: + with open(filename, "rb") as myfile: data = myfile.read() - return data + return data.decode('utf-8') def write_secret_test_file(self, filename='/tmp/storesecret', payload="Payload for testing"): @@ -210,6 +215,6 @@ class SecretBehaviors(base_behaviors.BaseBehaviors): :return """ myfile = open(filename, "wb") - myfile.write(payload) + myfile.write(payload.encode('utf-8')) myfile.close() return diff --git a/functionaltests/cli/v1/smoke/test_secret.py b/functionaltests/cli/v1/smoke/test_secret.py index b030b0f..65357f0 100644 --- a/functionaltests/cli/v1/smoke/test_secret.py +++ b/functionaltests/cli/v1/smoke/test_secret.py @@ -37,8 +37,8 @@ class SecretTestCase(CmdLineTestCase): 'symmetric': ['symmetric', 'aes', '128', - ('\x00\x01\x02\x03\x04\x05\x06\x07' - '\x00\x01\x02\x03\x04\x05\x06\x07')], + (b'\x00\x01\x02\x03\x04\x05\x06\x07' + b'\x00\x01\x02\x03\x04\x05\x06\x07')], 'private': ['private', 'rsa', '2048', diff --git a/functionaltests/client/v1/functional/test_acl.py b/functionaltests/client/v1/functional/test_acl.py index d9f8fc8..d9ad6f2 100644 --- a/functionaltests/client/v1/functional/test_acl.py +++ b/functionaltests/client/v1/functional/test_acl.py @@ -24,7 +24,7 @@ from barbicanclient import exceptions create_secret_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", diff --git a/functionaltests/client/v1/functional/test_containers.py b/functionaltests/client/v1/functional/test_containers.py index 64b9cdc..bdcd5a3 100644 --- a/functionaltests/client/v1/functional/test_containers.py +++ b/functionaltests/client/v1/functional/test_containers.py @@ -22,11 +22,11 @@ from barbicanclient import exceptions create_secret_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", - "payload": "gF6+lLoF3ohA9aPRpt+6bQ==", + "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==", "payload_content_type": "application/octet-stream", "payload_content_encoding": "base64", } @@ -48,7 +48,7 @@ create_container_empty_data = { accepted_str_values = { 'alphanumeric': ['a2j3j6ll9'], 'punctuation': ['~!@#$%^&*()_+`-={}[]|:;<>,.?'], - 'len_255': [str(bytearray().zfill(255))], + 'len_255': ['a' * 255], 'uuid': ['54262d9d-4bc7-4821-8df0-dc2ca8e112bb'], 'empty': [''] } @@ -139,7 +139,7 @@ class GenericContainersTestCase(BaseContainersTestCase): e = self.assertRaises(ValueError, self.barbicanclient.containers.get, url) - self.assertEqual('Container incorrectly specified.', e.message) + self.assertEqual('Container incorrectly specified.', str(e)) @testcase.attr('negative') def test_get_non_existent_container_valid_uuid(self): @@ -171,7 +171,7 @@ class GenericContainersTestCase(BaseContainersTestCase): e = self.assertRaises(ValueError, self.barbicanclient.containers.get, url) - self.assertEqual('Container incorrectly specified.', e.message) + self.assertEqual('Container incorrectly specified.', str(e)) @testcase.attr('negative') def test_delete_non_existent_container_valid_uuid(self): @@ -296,7 +296,7 @@ class RSAContainersTestCase(BaseContainersTestCase): self.barbicanclient.containers.create_rsa, **incorrect_names_rsa_container) - self.assertIn('got an unexpected keyword argument', e.message) + self.assertIn('got an unexpected keyword argument', str(e)) @testcase.attr('negative') def test_create_rsa_no_public_key(self): diff --git a/functionaltests/client/v1/functional/test_orders.py b/functionaltests/client/v1/functional/test_orders.py index 4dc2444..3fd34e1 100644 --- a/functionaltests/client/v1/functional/test_orders.py +++ b/functionaltests/client/v1/functional/test_orders.py @@ -164,7 +164,7 @@ class OrdersTestCase(base.TestCase): e = self.assertRaises(ValueError, self.barbicanclient.orders.get, ref) # verify that the order get failed - self.assertEqual('Order incorrectly specified.', e.message) + self.assertEqual('Order incorrectly specified.', str(e)) @testcase.attr('negative') def test_get_order_defaults_that_doesnt_exist_valid_uuid(self): @@ -252,7 +252,7 @@ class OrdersTestCase(base.TestCase): self.assertEqual(order.bit_length, order_resp.bit_length) @utils.parameterized_dataset({ - 'negative_maxint': [-sys.maxint], + 'negative_maxsize': [-sys.maxsize], 'negative_7': [-7], 'negative_1': [-1], '0': [0], diff --git a/functionaltests/client/v1/functional/test_secrets.py b/functionaltests/client/v1/functional/test_secrets.py index 8d9fcf0..fae6c42 100644 --- a/functionaltests/client/v1/functional/test_secrets.py +++ b/functionaltests/client/v1/functional/test_secrets.py @@ -28,11 +28,11 @@ from testtools import testcase secret_create_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", - "payload": "gF6+lLoF3ohA9aPRpt+6bQ==" + "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==" } secret_create_nones_data = { @@ -41,7 +41,7 @@ secret_create_nones_data = { "algorithm": None, "bit_length": None, "mode": None, - "payload": "gF6+lLoF3ohA9aPRpt+6bQ==", + "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==", "payload_content_type": "application/octet-stream", "payload_content_encoding": "base64", } @@ -52,7 +52,7 @@ secret_create_emptystrings_data = { "algorithm": '', "bit_length": '', "mode": '', - "payload": '', + "payload": b'', "payload_content_type": '', "payload_content_encoding": '', } @@ -145,7 +145,7 @@ class SecretsTestCase(base.TestCase): e = self.assertRaises(ValueError, self.barbicanclient.secrets.delete, url) - self.assertEqual('Secret incorrectly specified.', e.message) + self.assertEqual('Secret incorrectly specified.', str(e)) @testcase.attr('negative') def test_secret_delete_doesnt_exist_valid_uuid_format(self): @@ -179,7 +179,7 @@ class SecretsTestCase(base.TestCase): e = self.assertRaises(ValueError, self.barbicanclient.secrets.get, url, 'text/plain') - self.assertIn("Secret incorrectly specified", e.message) + self.assertIn("Secret incorrectly specified", str(e)) @testcase.attr('negative') def test_secret_create_defaults_expiration_passed(self): @@ -309,8 +309,8 @@ class SecretsTestCase(base.TestCase): 'symmetric': ['symmetric', 'aes', 128, - ('\x00\x01\x02\x03\x04\x05\x06\x07' - '\x00\x01\x02\x03\x04\x05\x06\x07')], + (b'\x00\x01\x02\x03\x04\x05\x06\x07' + b'\x00\x01\x02\x03\x04\x05\x06\x07')], 'private': ['private', 'rsa', 2048, @@ -390,7 +390,7 @@ class SecretsTestCase(base.TestCase): 'str_type': ['not-an-int'], 'empty': [''], 'blank': [' '], - 'negative_maxint': [-sys.maxint], + 'negative_maxsize': [-sys.maxsize], 'negative_one': [-1], 'zero': [0] }) @@ -481,7 +481,7 @@ class SecretsTestCase(base.TestCase): resp.payload ) else: - self.assertEqual(secret.payload, str(resp.payload)) + self.assertEqual(secret.payload, resp.payload.encode('utf-8')) @utils.parameterized_dataset({ 'large_string_content_type_and_encoding': { @@ -703,7 +703,7 @@ class SecretsTestCase(base.TestCase): 'alphanumeric': ['1f34ds'], 'punctuation': ['~!@#$%^&*()_+`-={}[]|:;<>,.?'], 'uuid': ['54262d9d-4bc7-4821-8df0-dc2ca8e112bb'], - 'len_255': [str(bytearray().zfill(255))], + 'len_255': ['a' * 255], 'empty': [''], 'null': [None] }) diff --git a/functionaltests/client/v1/smoke/test_containers.py b/functionaltests/client/v1/smoke/test_containers.py index 584df47..28792b7 100644 --- a/functionaltests/client/v1/smoke/test_containers.py +++ b/functionaltests/client/v1/smoke/test_containers.py @@ -20,11 +20,11 @@ from testtools import testcase create_secret_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", - "payload": "gF6+lLoF3ohA9aPRpt+6bQ==", + "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==", "payload_content_type": "application/octet-stream", "payload_content_encoding": "base64", } @@ -114,7 +114,7 @@ class ContainersTestCase(base.TestCase): @utils.parameterized_dataset({ 'alphanumeric': ['a2j3j6ll9'], 'punctuation': ['~!@#$%^&*()_+`-={}[]|:;<>,.?'], - 'len_255': [str(bytearray().zfill(255))], + 'len_255': ['a' * 255], 'uuid': ['54262d9d-4bc7-4821-8df0-dc2ca8e112bb'], 'empty': [''] }) @@ -137,7 +137,7 @@ class ContainersTestCase(base.TestCase): self.assertEqual(container_ref, container_resp.container_ref) get_resp_secret_refs = [] - for name, ref in container_resp.secret_refs.iteritems(): + for name, ref in container_resp.secret_refs.items(): get_resp_secret_refs.append(str(ref)) # Verify the secret refs in the response @@ -164,7 +164,7 @@ class ContainersTestCase(base.TestCase): self.assertEqual(container_ref, container_resp.container_ref) get_resp_secret_refs = [] - for name, ref in container_resp.secret_refs.iteritems(): + for name, ref in container_resp.secret_refs.items(): get_resp_secret_refs.append(str(ref)) # Verify the secret refs in the response self.assertEqual(3, len(container_resp.secret_refs)) diff --git a/functionaltests/client/v1/smoke/test_secrets.py b/functionaltests/client/v1/smoke/test_secrets.py index 3f11740..0b9e358 100644 --- a/functionaltests/client/v1/smoke/test_secrets.py +++ b/functionaltests/client/v1/smoke/test_secrets.py @@ -21,11 +21,11 @@ from testtools import testcase secret_create_defaults_data = { "name": "AES key", - "expiration": "2020-02-28T19:14:44.180394", + "expiration": "2030-02-28T19:14:44.180394", "algorithm": "aes", "bit_length": 256, "mode": "cbc", - "payload": "gF6+lLoF3ohA9aPRpt+6bQ==" + "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==" } secret_create_nones_data = { @@ -34,7 +34,7 @@ secret_create_nones_data = { "algorithm": None, "bit_length": None, "mode": None, - "payload": "gF6+lLoF3ohA9aPRpt+6bQ==", + "payload": b"gF6+lLoF3ohA9aPRpt+6bQ==", "payload_content_type": "application/octet-stream", "payload_content_encoding": "base64", } @@ -65,8 +65,8 @@ class SecretsTestCase(base.TestCase): 'symmetric': ['symmetric', 'aes', 128, - ('\x00\x01\x02\x03\x04\x05\x06\x07' - '\x00\x01\x02\x03\x04\x05\x06\x07')], + (b'\x00\x01\x02\x03\x04\x05\x06\x07' + b'\x00\x01\x02\x03\x04\x05\x06\x07')], 'private': ['private', 'rsa', 2048, diff --git a/functionaltests/common/keys.py b/functionaltests/common/keys.py index 44435b2..377de6d 100644 --- a/functionaltests/common/keys.py +++ b/functionaltests/common/keys.py @@ -26,7 +26,7 @@ def get_private_key_pem(): of the private.pk8 file. """ - return """-----BEGIN PRIVATE KEY----- + return b"""-----BEGIN PRIVATE KEY----- MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCza2VoDXmBUMmw jFu9F6MM5q/AZ1WjnWA2YNdNy237TrGN/nobDDv8FBBpUPmHNZ04H1LyxFcP8ReF rcIXpifsReu2lAWaqRPxovu5CuAhfecKv+RhjLVLJ0I+MZIb72ROKpfZTmb7dhlF @@ -69,88 +69,88 @@ def get_private_key_der(): of the private_pk8.der file. """ key_der = ( - '\x30\x82\x04\xbf\x02\x01\x00\x30\x0d\x06\x09\x2a\x86\x48\x86' - '\xf7\x0d\x01\x01\x01\x05\x00\x04\x82\x04\xa9\x30\x82\x04\xa5' - '\x02\x01\x00\x02\x82\x01\x01\x00\xb3\x6b\x65\x68\x0d\x79\x81' - '\x50\xc9\xb0\x8c\x5b\xbd\x17\xa3\x0c\xe6\xaf\xc0\x67\x55\xa3' - '\x9d\x60\x36\x60\xd7\x4d\xcb\x6d\xfb\x4e\xb1\x8d\xfe\x7a\x1b' - '\x0c\x3b\xfc\x14\x10\x69\x50\xf9\x87\x35\x9d\x38\x1f\x52\xf2' - '\xc4\x57\x0f\xf1\x17\x85\xad\xc2\x17\xa6\x27\xec\x45\xeb\xb6' - '\x94\x05\x9a\xa9\x13\xf1\xa2\xfb\xb9\x0a\xe0\x21\x7d\xe7\x0a' - '\xbf\xe4\x61\x8c\xb5\x4b\x27\x42\x3e\x31\x92\x1b\xef\x64\x4e' - '\x2a\x97\xd9\x4e\x66\xfb\x76\x19\x45\x80\x60\xf7\xbe\x40\xb9' - '\xd4\x10\x9f\x84\x65\x56\xdf\x9c\x39\xd8\xe6\x3f\xdb\x7c\x79' - '\x31\xe3\xb8\xca\xfc\x79\x9b\x23\xdc\x72\x7c\x4c\x55\x0e\x36' - '\x2a\xe0\xeb\xcc\xaa\xa3\x06\x54\xa3\x98\x19\xdc\xa4\x66\x31' - '\xd0\x98\x02\x4f\xeb\x32\x16\x61\xec\x97\xca\xce\x92\xa0\x8f' - '\x3c\x52\xe8\xdb\x86\x10\x9f\xee\x3f\xa6\xbd\x40\x63\x06\x99' - '\x01\xb3\x13\x97\xdc\xe8\x2e\xd1\x10\x8f\xab\x31\x49\xcb\x87' - '\x71\x2f\x5e\xf2\x78\xa9\xb4\x3c\x65\xb1\xb2\xd0\x82\xa1\x95' - '\x68\x67\x44\xd7\x5e\xec\xb4\x2f\x79\x40\x7e\xd4\xbc\x84\xdb' - '\xb9\x8c\xdd\x8d\x9c\x01\x15\xcd\x52\x83\x3f\x06\x67\xfd\xa1' - '\x2d\x2b\x07\xba\x32\x62\x21\x07\x2f\x02\x03\x01\x00\x01\x02' - '\x82\x01\x00\x30\xe9\x54\x29\xbb\x92\xa6\x28\x29\xf3\x91\x2f' - '\xe9\x2a\xaa\x6e\x77\xec\xed\x9c\xbe\x01\xee\x83\x2e\x0f\xd4' - '\x62\x06\xd5\x22\xaf\x5f\x44\x00\x5d\xb5\x45\xee\x8c\x57\xc3' - '\xe9\x92\x03\x94\x52\x8f\x5b\x9f\x5e\x73\x84\x06\xdf\xf7\xaf' - '\x9b\xe7\xb4\x83\xd1\xee\x0c\x41\x3b\x72\xf8\x83\x56\x98\x45' - '\x31\x98\x66\xdb\x19\x15\xe4\xcb\x77\xd2\xbc\x61\x3c\x1e\xa9' - '\xc5\xa5\x1c\x2f\xec\x3f\x92\x91\xfe\x5c\x38\xcc\x50\x97\x49' - '\x07\xc0\x38\x3f\x74\x31\xfb\x17\xc8\x79\x60\x50\x6f\xcc\x1d' - '\xfc\x42\xd5\x4a\x07\xd1\x2d\x13\x5e\xa9\x82\xf4\xd0\xa5\xd5' - '\xb3\x4e\x3f\x14\xe0\x44\x86\xa4\xa2\xaa\x2f\xe8\x1d\x82\x78' - '\x83\x13\x6b\x4a\x82\x0d\x5f\xbd\x4f\x1d\x56\xda\x12\x29\x08' - '\xca\x0c\xe2\xe0\x76\x55\xc8\xcb\xad\xdc\xb1\x3a\x71\xe1\xf3' - '\x7d\x28\xfb\xd5\xfb\x67\xf9\x48\xb4\x4f\x39\x0b\x39\xbf\x8d' - '\xa0\x13\xf7\xd6\x16\x87\x0b\xfb\x1f\x0a\xba\x4a\x83\xb4\x2d' - '\x50\xff\x6a\xf5\xd4\x6a\xe9\xd6\x5c\x23\x5e\xea\xe5\xde\xe8' - '\x11\xd1\x13\x78\x34\x4a\x85\x3d\xaf\x9b\xb6\xf1\xd9\xb2\xc6' - '\x78\x5d\x70\xd8\x7f\x41\xfd\x5f\x35\xba\x98\xe2\x01\xa8\x76' - '\x45\x59\xde\x71\x02\x81\x81\x00\xec\x7c\x74\xa3\x47\x58\x1d' - '\xf9\x21\xf0\xff\x60\x3d\x49\xa5\xd2\xd6\x4f\x4b\x79\x72\xed' - '\xf9\x46\xc3\x41\xd6\xe3\x60\xeb\x21\xe4\xba\x13\xf8\x43\x7f' - '\xba\xd3\xbb\xd1\x1c\x83\x62\xa8\xe5\x87\x3a\x89\xcd\xc8\x8a' - '\x4e\xe0\x16\xe5\x25\x4f\x0b\xa8\x10\xb8\x2a\x69\x03\x6f\x4a' - '\x9e\xda\xbb\xc7\x5f\x8b\xc3\xfe\x30\x1b\xde\x3b\xa6\x85\xdb' - '\xeb\x4b\x4b\x76\x0d\xc1\x2b\x99\x81\x15\x33\x91\x93\x90\x13' - '\xa8\x0c\x15\xab\xbb\x7e\xd8\xdb\x52\xe5\x2f\xc9\xba\x7c\xec' - '\xe7\x1a\xd1\xa2\x50\xc5\x9d\x25\xf8\x2a\x7b\xd5\x97\xa2\x63' - '\xdd\x02\x81\x81\x00\xc2\x39\x76\x53\x55\x74\x4f\x10\x58\x67' - '\xaa\x7a\x8b\x12\xb6\x5e\xe8\x42\x64\xc9\x2c\x06\xf3\x08\x2d' - '\x39\xd0\xa6\xaf\xae\xb4\x6e\x87\x18\xd6\x2f\x6f\x57\xe4\x5a' - '\x33\x58\x80\x44\x75\xfa\xbb\xfb\x2e\x32\x19\x33\xfb\x72\x91' - '\x8a\x7c\xf1\x20\x6e\x60\x42\xcc\xa2\x5a\x64\xe9\x15\x5d\xbd' - '\xf1\x6f\x6f\x91\x1b\x66\xb0\x24\x03\x9f\x69\xb2\xf7\x4c\xaf' - '\xe1\xee\xac\x2c\x8d\x27\x83\xb9\x7f\x37\x7a\xfb\x0b\x02\xcb' - '\x34\x85\x7f\x0a\xa7\xb2\x68\xde\x34\xb2\xec\xc4\xf0\x08\xe0' - '\x12\x06\xb9\x8d\x3b\x9a\xe9\xb3\xf9\x9b\xec\x7c\x7b\x02\x81' - '\x81\x00\x9e\xb9\x6d\xc3\xc5\x77\xe4\x2e\x39\xd4\xba\x63\x0a' - '\xdf\xaa\x97\xd7\x55\xc3\x6f\x91\x6f\x1e\x37\x9b\x88\x4e\x45' - '\xb0\xe0\x40\x90\x77\x40\x3e\x0a\x77\xe9\x9a\x81\x5d\xfa\x08' - '\x49\x28\xd9\x5d\xa9\x31\xa2\xd7\xed\xd4\xc0\xdd\x3d\x11\x8c' - '\x7b\x63\x63\x4d\x68\xd1\xb1\x07\x7a\x8b\x22\x7e\x94\x73\x91' - '\xa8\x8b\xac\x18\x98\x51\x6b\x14\x3f\x26\x2f\x14\x47\xf9\x35' - '\x65\x21\x13\x9d\x7a\x4e\x44\x3f\x98\xa1\xda\xf2\x94\xa0\x34' - '\xa4\x32\x98\xf1\xd0\xe0\x51\xf5\xd5\x3f\xcc\x25\x56\x0f\x66' - '\x83\x72\x5f\x9d\x8c\x1e\x31\x37\x42\x55\x02\x81\x81\x00\xb1' - '\xd7\x7d\xe2\x36\x68\x26\x91\x37\xf1\xcc\x67\x22\xfb\x02\x64' - '\x8a\xd5\x68\x85\xd0\x3b\x98\xc3\x8e\xed\xd6\x81\x1a\x72\xa5' - '\x22\x63\xaf\xb9\x47\x7b\xf3\x85\xd3\x96\x1a\x5e\x70\xd1\x7a' - '\xc2\x2f\xf0\x0f\xcd\x86\x0c\xa2\xce\x63\x79\x9e\x2c\xed\x04' - '\x55\x86\x1c\xcf\x1a\x81\x56\xa0\x1c\x71\x7b\x71\x33\xf4\x5c' - '\x25\xc3\x04\x52\x2e\xad\xc1\xc5\xc5\x72\xe2\x61\x62\xf5\xe9' - '\x0d\xb3\x87\xaa\x5c\x80\x8c\x87\x85\x5b\xd5\x35\x0b\xa3\x9c' - '\x38\x6b\xe6\xe3\x42\xeb\xdd\x42\xb3\x31\xae\x58\xae\xda\xba' - '\x31\x6e\x2b\x8b\xbb\x92\x0b\x02\x81\x81\x00\xdf\x76\xa5\x63' - '\x4f\x8b\x97\x98\x6c\x0e\x87\x5c\xf8\x3f\x3b\xfa\x18\x2a\x1c' - '\xfb\xa1\xa8\x6d\x78\x38\x0e\xfb\xc2\x52\x33\xfd\x31\x1f\xb6' - '\xfb\x9b\x17\xd0\x06\x3f\x7f\xe6\x95\x08\x3d\x39\xfc\xd8\xf4' - '\x46\xaa\x40\xc1\x47\x34\xdf\x36\x54\xe5\x9b\x4b\xda\xe3\x5e' - '\xe9\x70\xe3\x12\xe8\x1f\x16\xd9\x73\x79\xae\xbe\xad\xb0\xfa' - '\x2a\x91\x52\xfa\x7c\x4f\x24\x0f\x18\xc9\x66\x11\xa4\xd8\x69' - '\x45\x61\x96\x41\xa9\x07\x79\xda\xf7\x06\xd3\x2d\x1a\xcd\x21' - '\xa4\xa3\x40\x40\x6e\xf6\x1c\xa5\xad\x49\xf2\x50\x31\x7b\xe7' - '\xd9\x19\x62\x70') + b'\x30\x82\x04\xbf\x02\x01\x00\x30\x0d\x06\x09\x2a\x86\x48\x86' + b'\xf7\x0d\x01\x01\x01\x05\x00\x04\x82\x04\xa9\x30\x82\x04\xa5' + b'\x02\x01\x00\x02\x82\x01\x01\x00\xb3\x6b\x65\x68\x0d\x79\x81' + b'\x50\xc9\xb0\x8c\x5b\xbd\x17\xa3\x0c\xe6\xaf\xc0\x67\x55\xa3' + b'\x9d\x60\x36\x60\xd7\x4d\xcb\x6d\xfb\x4e\xb1\x8d\xfe\x7a\x1b' + b'\x0c\x3b\xfc\x14\x10\x69\x50\xf9\x87\x35\x9d\x38\x1f\x52\xf2' + b'\xc4\x57\x0f\xf1\x17\x85\xad\xc2\x17\xa6\x27\xec\x45\xeb\xb6' + b'\x94\x05\x9a\xa9\x13\xf1\xa2\xfb\xb9\x0a\xe0\x21\x7d\xe7\x0a' + b'\xbf\xe4\x61\x8c\xb5\x4b\x27\x42\x3e\x31\x92\x1b\xef\x64\x4e' + b'\x2a\x97\xd9\x4e\x66\xfb\x76\x19\x45\x80\x60\xf7\xbe\x40\xb9' + b'\xd4\x10\x9f\x84\x65\x56\xdf\x9c\x39\xd8\xe6\x3f\xdb\x7c\x79' + b'\x31\xe3\xb8\xca\xfc\x79\x9b\x23\xdc\x72\x7c\x4c\x55\x0e\x36' + b'\x2a\xe0\xeb\xcc\xaa\xa3\x06\x54\xa3\x98\x19\xdc\xa4\x66\x31' + b'\xd0\x98\x02\x4f\xeb\x32\x16\x61\xec\x97\xca\xce\x92\xa0\x8f' + b'\x3c\x52\xe8\xdb\x86\x10\x9f\xee\x3f\xa6\xbd\x40\x63\x06\x99' + b'\x01\xb3\x13\x97\xdc\xe8\x2e\xd1\x10\x8f\xab\x31\x49\xcb\x87' + b'\x71\x2f\x5e\xf2\x78\xa9\xb4\x3c\x65\xb1\xb2\xd0\x82\xa1\x95' + b'\x68\x67\x44\xd7\x5e\xec\xb4\x2f\x79\x40\x7e\xd4\xbc\x84\xdb' + b'\xb9\x8c\xdd\x8d\x9c\x01\x15\xcd\x52\x83\x3f\x06\x67\xfd\xa1' + b'\x2d\x2b\x07\xba\x32\x62\x21\x07\x2f\x02\x03\x01\x00\x01\x02' + b'\x82\x01\x00\x30\xe9\x54\x29\xbb\x92\xa6\x28\x29\xf3\x91\x2f' + b'\xe9\x2a\xaa\x6e\x77\xec\xed\x9c\xbe\x01\xee\x83\x2e\x0f\xd4' + b'\x62\x06\xd5\x22\xaf\x5f\x44\x00\x5d\xb5\x45\xee\x8c\x57\xc3' + b'\xe9\x92\x03\x94\x52\x8f\x5b\x9f\x5e\x73\x84\x06\xdf\xf7\xaf' + b'\x9b\xe7\xb4\x83\xd1\xee\x0c\x41\x3b\x72\xf8\x83\x56\x98\x45' + b'\x31\x98\x66\xdb\x19\x15\xe4\xcb\x77\xd2\xbc\x61\x3c\x1e\xa9' + b'\xc5\xa5\x1c\x2f\xec\x3f\x92\x91\xfe\x5c\x38\xcc\x50\x97\x49' + b'\x07\xc0\x38\x3f\x74\x31\xfb\x17\xc8\x79\x60\x50\x6f\xcc\x1d' + b'\xfc\x42\xd5\x4a\x07\xd1\x2d\x13\x5e\xa9\x82\xf4\xd0\xa5\xd5' + b'\xb3\x4e\x3f\x14\xe0\x44\x86\xa4\xa2\xaa\x2f\xe8\x1d\x82\x78' + b'\x83\x13\x6b\x4a\x82\x0d\x5f\xbd\x4f\x1d\x56\xda\x12\x29\x08' + b'\xca\x0c\xe2\xe0\x76\x55\xc8\xcb\xad\xdc\xb1\x3a\x71\xe1\xf3' + b'\x7d\x28\xfb\xd5\xfb\x67\xf9\x48\xb4\x4f\x39\x0b\x39\xbf\x8d' + b'\xa0\x13\xf7\xd6\x16\x87\x0b\xfb\x1f\x0a\xba\x4a\x83\xb4\x2d' + b'\x50\xff\x6a\xf5\xd4\x6a\xe9\xd6\x5c\x23\x5e\xea\xe5\xde\xe8' + b'\x11\xd1\x13\x78\x34\x4a\x85\x3d\xaf\x9b\xb6\xf1\xd9\xb2\xc6' + b'\x78\x5d\x70\xd8\x7f\x41\xfd\x5f\x35\xba\x98\xe2\x01\xa8\x76' + b'\x45\x59\xde\x71\x02\x81\x81\x00\xec\x7c\x74\xa3\x47\x58\x1d' + b'\xf9\x21\xf0\xff\x60\x3d\x49\xa5\xd2\xd6\x4f\x4b\x79\x72\xed' + b'\xf9\x46\xc3\x41\xd6\xe3\x60\xeb\x21\xe4\xba\x13\xf8\x43\x7f' + b'\xba\xd3\xbb\xd1\x1c\x83\x62\xa8\xe5\x87\x3a\x89\xcd\xc8\x8a' + b'\x4e\xe0\x16\xe5\x25\x4f\x0b\xa8\x10\xb8\x2a\x69\x03\x6f\x4a' + b'\x9e\xda\xbb\xc7\x5f\x8b\xc3\xfe\x30\x1b\xde\x3b\xa6\x85\xdb' + b'\xeb\x4b\x4b\x76\x0d\xc1\x2b\x99\x81\x15\x33\x91\x93\x90\x13' + b'\xa8\x0c\x15\xab\xbb\x7e\xd8\xdb\x52\xe5\x2f\xc9\xba\x7c\xec' + b'\xe7\x1a\xd1\xa2\x50\xc5\x9d\x25\xf8\x2a\x7b\xd5\x97\xa2\x63' + b'\xdd\x02\x81\x81\x00\xc2\x39\x76\x53\x55\x74\x4f\x10\x58\x67' + b'\xaa\x7a\x8b\x12\xb6\x5e\xe8\x42\x64\xc9\x2c\x06\xf3\x08\x2d' + b'\x39\xd0\xa6\xaf\xae\xb4\x6e\x87\x18\xd6\x2f\x6f\x57\xe4\x5a' + b'\x33\x58\x80\x44\x75\xfa\xbb\xfb\x2e\x32\x19\x33\xfb\x72\x91' + b'\x8a\x7c\xf1\x20\x6e\x60\x42\xcc\xa2\x5a\x64\xe9\x15\x5d\xbd' + b'\xf1\x6f\x6f\x91\x1b\x66\xb0\x24\x03\x9f\x69\xb2\xf7\x4c\xaf' + b'\xe1\xee\xac\x2c\x8d\x27\x83\xb9\x7f\x37\x7a\xfb\x0b\x02\xcb' + b'\x34\x85\x7f\x0a\xa7\xb2\x68\xde\x34\xb2\xec\xc4\xf0\x08\xe0' + b'\x12\x06\xb9\x8d\x3b\x9a\xe9\xb3\xf9\x9b\xec\x7c\x7b\x02\x81' + b'\x81\x00\x9e\xb9\x6d\xc3\xc5\x77\xe4\x2e\x39\xd4\xba\x63\x0a' + b'\xdf\xaa\x97\xd7\x55\xc3\x6f\x91\x6f\x1e\x37\x9b\x88\x4e\x45' + b'\xb0\xe0\x40\x90\x77\x40\x3e\x0a\x77\xe9\x9a\x81\x5d\xfa\x08' + b'\x49\x28\xd9\x5d\xa9\x31\xa2\xd7\xed\xd4\xc0\xdd\x3d\x11\x8c' + b'\x7b\x63\x63\x4d\x68\xd1\xb1\x07\x7a\x8b\x22\x7e\x94\x73\x91' + b'\xa8\x8b\xac\x18\x98\x51\x6b\x14\x3f\x26\x2f\x14\x47\xf9\x35' + b'\x65\x21\x13\x9d\x7a\x4e\x44\x3f\x98\xa1\xda\xf2\x94\xa0\x34' + b'\xa4\x32\x98\xf1\xd0\xe0\x51\xf5\xd5\x3f\xcc\x25\x56\x0f\x66' + b'\x83\x72\x5f\x9d\x8c\x1e\x31\x37\x42\x55\x02\x81\x81\x00\xb1' + b'\xd7\x7d\xe2\x36\x68\x26\x91\x37\xf1\xcc\x67\x22\xfb\x02\x64' + b'\x8a\xd5\x68\x85\xd0\x3b\x98\xc3\x8e\xed\xd6\x81\x1a\x72\xa5' + b'\x22\x63\xaf\xb9\x47\x7b\xf3\x85\xd3\x96\x1a\x5e\x70\xd1\x7a' + b'\xc2\x2f\xf0\x0f\xcd\x86\x0c\xa2\xce\x63\x79\x9e\x2c\xed\x04' + b'\x55\x86\x1c\xcf\x1a\x81\x56\xa0\x1c\x71\x7b\x71\x33\xf4\x5c' + b'\x25\xc3\x04\x52\x2e\xad\xc1\xc5\xc5\x72\xe2\x61\x62\xf5\xe9' + b'\x0d\xb3\x87\xaa\x5c\x80\x8c\x87\x85\x5b\xd5\x35\x0b\xa3\x9c' + b'\x38\x6b\xe6\xe3\x42\xeb\xdd\x42\xb3\x31\xae\x58\xae\xda\xba' + b'\x31\x6e\x2b\x8b\xbb\x92\x0b\x02\x81\x81\x00\xdf\x76\xa5\x63' + b'\x4f\x8b\x97\x98\x6c\x0e\x87\x5c\xf8\x3f\x3b\xfa\x18\x2a\x1c' + b'\xfb\xa1\xa8\x6d\x78\x38\x0e\xfb\xc2\x52\x33\xfd\x31\x1f\xb6' + b'\xfb\x9b\x17\xd0\x06\x3f\x7f\xe6\x95\x08\x3d\x39\xfc\xd8\xf4' + b'\x46\xaa\x40\xc1\x47\x34\xdf\x36\x54\xe5\x9b\x4b\xda\xe3\x5e' + b'\xe9\x70\xe3\x12\xe8\x1f\x16\xd9\x73\x79\xae\xbe\xad\xb0\xfa' + b'\x2a\x91\x52\xfa\x7c\x4f\x24\x0f\x18\xc9\x66\x11\xa4\xd8\x69' + b'\x45\x61\x96\x41\xa9\x07\x79\xda\xf7\x06\xd3\x2d\x1a\xcd\x21' + b'\xa4\xa3\x40\x40\x6e\xf6\x1c\xa5\xad\x49\xf2\x50\x31\x7b\xe7' + b'\xd9\x19\x62\x70') return key_der @@ -166,7 +166,7 @@ def get_public_key_pem(): of the public.pem file. """ - return """-----BEGIN PUBLIC KEY----- + return b"""-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs2tlaA15gVDJsIxbvRej DOavwGdVo51gNmDXTctt+06xjf56Gww7/BQQaVD5hzWdOB9S8sRXD/EXha3CF6Yn 7EXrtpQFmqkT8aL7uQrgIX3nCr/kYYy1SydCPjGSG+9kTiqX2U5m+3YZRYBg975A @@ -189,26 +189,26 @@ def get_public_key_der(): of the public.der file. """ key_der = ( - '\x30\x82\x01\x22\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01' - '\x01\x01\x05\x00\x03\x82\x01\x0f\x00\x30\x82\x01\x0a\x02\x82' - '\x01\x01\x00\xb3\x6b\x65\x68\x0d\x79\x81\x50\xc9\xb0\x8c\x5b' - '\xbd\x17\xa3\x0c\xe6\xaf\xc0\x67\x55\xa3\x9d\x60\x36\x60\xd7' - '\x4d\xcb\x6d\xfb\x4e\xb1\x8d\xfe\x7a\x1b\x0c\x3b\xfc\x14\x10' - '\x69\x50\xf9\x87\x35\x9d\x38\x1f\x52\xf2\xc4\x57\x0f\xf1\x17' - '\x85\xad\xc2\x17\xa6\x27\xec\x45\xeb\xb6\x94\x05\x9a\xa9\x13' - '\xf1\xa2\xfb\xb9\x0a\xe0\x21\x7d\xe7\x0a\xbf\xe4\x61\x8c\xb5' - '\x4b\x27\x42\x3e\x31\x92\x1b\xef\x64\x4e\x2a\x97\xd9\x4e\x66' - '\xfb\x76\x19\x45\x80\x60\xf7\xbe\x40\xb9\xd4\x10\x9f\x84\x65' - '\x56\xdf\x9c\x39\xd8\xe6\x3f\xdb\x7c\x79\x31\xe3\xb8\xca\xfc' - '\x79\x9b\x23\xdc\x72\x7c\x4c\x55\x0e\x36\x2a\xe0\xeb\xcc\xaa' - '\xa3\x06\x54\xa3\x98\x19\xdc\xa4\x66\x31\xd0\x98\x02\x4f\xeb' - '\x32\x16\x61\xec\x97\xca\xce\x92\xa0\x8f\x3c\x52\xe8\xdb\x86' - '\x10\x9f\xee\x3f\xa6\xbd\x40\x63\x06\x99\x01\xb3\x13\x97\xdc' - '\xe8\x2e\xd1\x10\x8f\xab\x31\x49\xcb\x87\x71\x2f\x5e\xf2\x78' - '\xa9\xb4\x3c\x65\xb1\xb2\xd0\x82\xa1\x95\x68\x67\x44\xd7\x5e' - '\xec\xb4\x2f\x79\x40\x7e\xd4\xbc\x84\xdb\xb9\x8c\xdd\x8d\x9c' - '\x01\x15\xcd\x52\x83\x3f\x06\x67\xfd\xa1\x2d\x2b\x07\xba\x32' - '\x62\x21\x07\x2f\x02\x03\x01\x00\x01') + b'\x30\x82\x01\x22\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01' + b'\x01\x01\x05\x00\x03\x82\x01\x0f\x00\x30\x82\x01\x0a\x02\x82' + b'\x01\x01\x00\xb3\x6b\x65\x68\x0d\x79\x81\x50\xc9\xb0\x8c\x5b' + b'\xbd\x17\xa3\x0c\xe6\xaf\xc0\x67\x55\xa3\x9d\x60\x36\x60\xd7' + b'\x4d\xcb\x6d\xfb\x4e\xb1\x8d\xfe\x7a\x1b\x0c\x3b\xfc\x14\x10' + b'\x69\x50\xf9\x87\x35\x9d\x38\x1f\x52\xf2\xc4\x57\x0f\xf1\x17' + b'\x85\xad\xc2\x17\xa6\x27\xec\x45\xeb\xb6\x94\x05\x9a\xa9\x13' + b'\xf1\xa2\xfb\xb9\x0a\xe0\x21\x7d\xe7\x0a\xbf\xe4\x61\x8c\xb5' + b'\x4b\x27\x42\x3e\x31\x92\x1b\xef\x64\x4e\x2a\x97\xd9\x4e\x66' + b'\xfb\x76\x19\x45\x80\x60\xf7\xbe\x40\xb9\xd4\x10\x9f\x84\x65' + b'\x56\xdf\x9c\x39\xd8\xe6\x3f\xdb\x7c\x79\x31\xe3\xb8\xca\xfc' + b'\x79\x9b\x23\xdc\x72\x7c\x4c\x55\x0e\x36\x2a\xe0\xeb\xcc\xaa' + b'\xa3\x06\x54\xa3\x98\x19\xdc\xa4\x66\x31\xd0\x98\x02\x4f\xeb' + b'\x32\x16\x61\xec\x97\xca\xce\x92\xa0\x8f\x3c\x52\xe8\xdb\x86' + b'\x10\x9f\xee\x3f\xa6\xbd\x40\x63\x06\x99\x01\xb3\x13\x97\xdc' + b'\xe8\x2e\xd1\x10\x8f\xab\x31\x49\xcb\x87\x71\x2f\x5e\xf2\x78' + b'\xa9\xb4\x3c\x65\xb1\xb2\xd0\x82\xa1\x95\x68\x67\x44\xd7\x5e' + b'\xec\xb4\x2f\x79\x40\x7e\xd4\xbc\x84\xdb\xb9\x8c\xdd\x8d\x9c' + b'\x01\x15\xcd\x52\x83\x3f\x06\x67\xfd\xa1\x2d\x2b\x07\xba\x32' + b'\x62\x21\x07\x2f\x02\x03\x01\x00\x01') return key_der @@ -226,7 +226,7 @@ def get_encrypted_private_key_pem(): of the private_encrypted.pk8 file. """ - return """-----BEGIN ENCRYPTED PRIVATE KEY----- + return b"""-----BEGIN ENCRYPTED PRIVATE KEY----- MIIE6TAbBgkqhkiG9w0BBQMwDgQIssadeQrYhhACAggABIIEyDNw3SV2b19yy4Q/ kTbtJ/p2X2zKDqr7GgLeAowqqhcMfvprI7G8C0XtwxkR4SjMZUXNcmOwQB2kNKtK ZilCz6pSx81iUj4s1fU460XkhkIeV+F7aB2PsTG1oDfPCuzKFjT6EuSE6lFUH89r @@ -268,7 +268,7 @@ def get_passphrase_txt(): of the passphrase.txt file. """ - return """password""" + return b"""password""" def get_csr_pem(): @@ -283,7 +283,7 @@ def get_csr_pem(): of the csr.pem file. """ - return """-----BEGIN CERTIFICATE REQUEST----- + return b"""-----BEGIN CERTIFICATE REQUEST----- MIICWzCCAUMCAQAwFjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3 DQEBAQUAA4IBDwAwggEKAoIBAQCza2VoDXmBUMmwjFu9F6MM5q/AZ1WjnWA2YNdN y237TrGN/nobDDv8FBBpUPmHNZ04H1LyxFcP8ReFrcIXpifsReu2lAWaqRPxovu5 @@ -313,7 +313,7 @@ def get_certificate_pem(): of the cert.pem file. """ - return """-----BEGIN CERTIFICATE----- + return b"""-----BEGIN CERTIFICATE----- MIIC/zCCAeegAwIBAgIJAOLqXKJ9q9/nMA0GCSqGSIb3DQEBCwUAMBYxFDASBgNV BAMMC2V4YW1wbGUuY29tMB4XDTE1MDQxMTAyMTUyOVoXDTE4MDEwNTAyMTUyOVow FjEUMBIGA1UEAwwLZXhhbXBsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw @@ -349,56 +349,56 @@ def get_certificate_der(): of the cert.der file. """ cert_der = ( - '\x30\x82\x02\xff\x30\x82\x01\xe7\xa0\x03\x02\x01\x02\x02\x09' - '\x00\xe2\xea\x5c\xa2\x7d\xab\xdf\xe7\x30\x0d\x06\x09\x2a\x86' - '\x48\x86\xf7\x0d\x01\x01\x0b\x05\x00\x30\x16\x31\x14\x30\x12' - '\x06\x03\x55\x04\x03\x0c\x0b\x65\x78\x61\x6d\x70\x6c\x65\x2e' - '\x63\x6f\x6d\x30\x1e\x17\x0d\x31\x35\x30\x34\x31\x31\x30\x32' - '\x31\x35\x32\x39\x5a\x17\x0d\x31\x38\x30\x31\x30\x35\x30\x32' - '\x31\x35\x32\x39\x5a\x30\x16\x31\x14\x30\x12\x06\x03\x55\x04' - '\x03\x0c\x0b\x65\x78\x61\x6d\x70\x6c\x65\x2e\x63\x6f\x6d\x30' - '\x82\x01\x22\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01' - '\x01\x05\x00\x03\x82\x01\x0f\x00\x30\x82\x01\x0a\x02\x82\x01' - '\x01\x00\xb3\x6b\x65\x68\x0d\x79\x81\x50\xc9\xb0\x8c\x5b\xbd' - '\x17\xa3\x0c\xe6\xaf\xc0\x67\x55\xa3\x9d\x60\x36\x60\xd7\x4d' - '\xcb\x6d\xfb\x4e\xb1\x8d\xfe\x7a\x1b\x0c\x3b\xfc\x14\x10\x69' - '\x50\xf9\x87\x35\x9d\x38\x1f\x52\xf2\xc4\x57\x0f\xf1\x17\x85' - '\xad\xc2\x17\xa6\x27\xec\x45\xeb\xb6\x94\x05\x9a\xa9\x13\xf1' - '\xa2\xfb\xb9\x0a\xe0\x21\x7d\xe7\x0a\xbf\xe4\x61\x8c\xb5\x4b' - '\x27\x42\x3e\x31\x92\x1b\xef\x64\x4e\x2a\x97\xd9\x4e\x66\xfb' - '\x76\x19\x45\x80\x60\xf7\xbe\x40\xb9\xd4\x10\x9f\x84\x65\x56' - '\xdf\x9c\x39\xd8\xe6\x3f\xdb\x7c\x79\x31\xe3\xb8\xca\xfc\x79' - '\x9b\x23\xdc\x72\x7c\x4c\x55\x0e\x36\x2a\xe0\xeb\xcc\xaa\xa3' - '\x06\x54\xa3\x98\x19\xdc\xa4\x66\x31\xd0\x98\x02\x4f\xeb\x32' - '\x16\x61\xec\x97\xca\xce\x92\xa0\x8f\x3c\x52\xe8\xdb\x86\x10' - '\x9f\xee\x3f\xa6\xbd\x40\x63\x06\x99\x01\xb3\x13\x97\xdc\xe8' - '\x2e\xd1\x10\x8f\xab\x31\x49\xcb\x87\x71\x2f\x5e\xf2\x78\xa9' - '\xb4\x3c\x65\xb1\xb2\xd0\x82\xa1\x95\x68\x67\x44\xd7\x5e\xec' - '\xb4\x2f\x79\x40\x7e\xd4\xbc\x84\xdb\xb9\x8c\xdd\x8d\x9c\x01' - '\x15\xcd\x52\x83\x3f\x06\x67\xfd\xa1\x2d\x2b\x07\xba\x32\x62' - '\x21\x07\x2f\x02\x03\x01\x00\x01\xa3\x50\x30\x4e\x30\x1d\x06' - '\x03\x55\x1d\x0e\x04\x16\x04\x14\x94\xab\x60\x34\x6f\x65\xe8' - '\xfa\xc2\xaf\x98\xa8\x0d\xf1\x6a\xbc\x97\xa8\xfc\xda\x30\x1f' - '\x06\x03\x55\x1d\x23\x04\x18\x30\x16\x80\x14\x94\xab\x60\x34' - '\x6f\x65\xe8\xfa\xc2\xaf\x98\xa8\x0d\xf1\x6a\xbc\x97\xa8\xfc' - '\xda\x30\x0c\x06\x03\x55\x1d\x13\x04\x05\x30\x03\x01\x01\xff' - '\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0b\x05\x00' - '\x03\x82\x01\x01\x00\x63\x8a\xea\xa1\x97\x33\x55\x39\x52\xeb' - '\x1c\x34\x32\x1a\xbd\x1f\x4c\x00\x85\x25\xd0\xd1\x12\x7b\xa1' - '\x66\x9e\x1d\xf7\x5f\xbe\x0e\x63\x02\x4f\xe6\xdc\x4c\x6d\x3e' - '\x18\x2a\x77\xad\xf1\x4e\xb8\x45\xa9\x24\xb2\xcb\x3d\xd4\x8e' - '\x9c\x8b\x27\x89\xbb\x0e\xb3\x22\x8f\x5e\xe0\x41\x5f\x99\x26' - '\x75\x82\x28\x8d\xb7\x63\x51\x34\xb0\x9e\x17\x31\xf4\x94\xc0' - '\x7c\xa4\xa6\xc5\x75\x92\x0b\x4a\xe7\x28\x27\x9f\x01\xfe\x38' - '\x32\x6e\x9f\xaa\xfa\x13\xc9\x36\xde\x19\x24\x0f\xea\x71\xf3' - '\x73\xb7\x8b\x68\xaf\xde\x7d\xca\xcc\xbd\x87\x5c\xb7\xe4\xde' - '\x4e\x41\xe3\xa9\x1f\x0b\xbb\x8a\x63\x66\xf4\x5d\x51\x06\x9d' - '\x40\x78\x43\xc8\xdf\x8e\x34\xa7\x4a\x0f\xd4\xeb\x8e\xf7\xcf' - '\x8a\x6d\x1b\xec\x0a\xbc\xf3\x93\xe3\x48\xde\x90\xa3\x86\x7d' - '\x1d\x74\x7a\xfa\x72\xbe\x6d\x3c\xfd\x1f\x25\x00\x4c\xc7\xc3' - '\x18\xd4\x2d\xd0\xbd\xef\xc9\xf5\x71\x6c\xd3\xb1\x90\x20\x5c' - '\x60\x8e\x21\x16\xd1\x9f\x90\xec\xdd\xe8\x1e\xeb\xda\xc6\x35' - '\xc0\x62\x9d\x4c\xb1\xe4\xb9\x3e\x26\xe3\xff\x40\xfd\x23\xb3' - '\xbe\x71\xfe\x7a\x99\xc9\xa8\x84\xbd\x8f\x0f\xb5\x89\x18\xfc' - '\xc5\xc0\xc0\xe8\xf3\x53') + b'\x30\x82\x02\xff\x30\x82\x01\xe7\xa0\x03\x02\x01\x02\x02\x09' + b'\x00\xe2\xea\x5c\xa2\x7d\xab\xdf\xe7\x30\x0d\x06\x09\x2a\x86' + b'\x48\x86\xf7\x0d\x01\x01\x0b\x05\x00\x30\x16\x31\x14\x30\x12' + b'\x06\x03\x55\x04\x03\x0c\x0b\x65\x78\x61\x6d\x70\x6c\x65\x2e' + b'\x63\x6f\x6d\x30\x1e\x17\x0d\x31\x35\x30\x34\x31\x31\x30\x32' + b'\x31\x35\x32\x39\x5a\x17\x0d\x31\x38\x30\x31\x30\x35\x30\x32' + b'\x31\x35\x32\x39\x5a\x30\x16\x31\x14\x30\x12\x06\x03\x55\x04' + b'\x03\x0c\x0b\x65\x78\x61\x6d\x70\x6c\x65\x2e\x63\x6f\x6d\x30' + b'\x82\x01\x22\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01' + b'\x01\x05\x00\x03\x82\x01\x0f\x00\x30\x82\x01\x0a\x02\x82\x01' + b'\x01\x00\xb3\x6b\x65\x68\x0d\x79\x81\x50\xc9\xb0\x8c\x5b\xbd' + b'\x17\xa3\x0c\xe6\xaf\xc0\x67\x55\xa3\x9d\x60\x36\x60\xd7\x4d' + b'\xcb\x6d\xfb\x4e\xb1\x8d\xfe\x7a\x1b\x0c\x3b\xfc\x14\x10\x69' + b'\x50\xf9\x87\x35\x9d\x38\x1f\x52\xf2\xc4\x57\x0f\xf1\x17\x85' + b'\xad\xc2\x17\xa6\x27\xec\x45\xeb\xb6\x94\x05\x9a\xa9\x13\xf1' + b'\xa2\xfb\xb9\x0a\xe0\x21\x7d\xe7\x0a\xbf\xe4\x61\x8c\xb5\x4b' + b'\x27\x42\x3e\x31\x92\x1b\xef\x64\x4e\x2a\x97\xd9\x4e\x66\xfb' + b'\x76\x19\x45\x80\x60\xf7\xbe\x40\xb9\xd4\x10\x9f\x84\x65\x56' + b'\xdf\x9c\x39\xd8\xe6\x3f\xdb\x7c\x79\x31\xe3\xb8\xca\xfc\x79' + b'\x9b\x23\xdc\x72\x7c\x4c\x55\x0e\x36\x2a\xe0\xeb\xcc\xaa\xa3' + b'\x06\x54\xa3\x98\x19\xdc\xa4\x66\x31\xd0\x98\x02\x4f\xeb\x32' + b'\x16\x61\xec\x97\xca\xce\x92\xa0\x8f\x3c\x52\xe8\xdb\x86\x10' + b'\x9f\xee\x3f\xa6\xbd\x40\x63\x06\x99\x01\xb3\x13\x97\xdc\xe8' + b'\x2e\xd1\x10\x8f\xab\x31\x49\xcb\x87\x71\x2f\x5e\xf2\x78\xa9' + b'\xb4\x3c\x65\xb1\xb2\xd0\x82\xa1\x95\x68\x67\x44\xd7\x5e\xec' + b'\xb4\x2f\x79\x40\x7e\xd4\xbc\x84\xdb\xb9\x8c\xdd\x8d\x9c\x01' + b'\x15\xcd\x52\x83\x3f\x06\x67\xfd\xa1\x2d\x2b\x07\xba\x32\x62' + b'\x21\x07\x2f\x02\x03\x01\x00\x01\xa3\x50\x30\x4e\x30\x1d\x06' + b'\x03\x55\x1d\x0e\x04\x16\x04\x14\x94\xab\x60\x34\x6f\x65\xe8' + b'\xfa\xc2\xaf\x98\xa8\x0d\xf1\x6a\xbc\x97\xa8\xfc\xda\x30\x1f' + b'\x06\x03\x55\x1d\x23\x04\x18\x30\x16\x80\x14\x94\xab\x60\x34' + b'\x6f\x65\xe8\xfa\xc2\xaf\x98\xa8\x0d\xf1\x6a\xbc\x97\xa8\xfc' + b'\xda\x30\x0c\x06\x03\x55\x1d\x13\x04\x05\x30\x03\x01\x01\xff' + b'\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0b\x05\x00' + b'\x03\x82\x01\x01\x00\x63\x8a\xea\xa1\x97\x33\x55\x39\x52\xeb' + b'\x1c\x34\x32\x1a\xbd\x1f\x4c\x00\x85\x25\xd0\xd1\x12\x7b\xa1' + b'\x66\x9e\x1d\xf7\x5f\xbe\x0e\x63\x02\x4f\xe6\xdc\x4c\x6d\x3e' + b'\x18\x2a\x77\xad\xf1\x4e\xb8\x45\xa9\x24\xb2\xcb\x3d\xd4\x8e' + b'\x9c\x8b\x27\x89\xbb\x0e\xb3\x22\x8f\x5e\xe0\x41\x5f\x99\x26' + b'\x75\x82\x28\x8d\xb7\x63\x51\x34\xb0\x9e\x17\x31\xf4\x94\xc0' + b'\x7c\xa4\xa6\xc5\x75\x92\x0b\x4a\xe7\x28\x27\x9f\x01\xfe\x38' + b'\x32\x6e\x9f\xaa\xfa\x13\xc9\x36\xde\x19\x24\x0f\xea\x71\xf3' + b'\x73\xb7\x8b\x68\xaf\xde\x7d\xca\xcc\xbd\x87\x5c\xb7\xe4\xde' + b'\x4e\x41\xe3\xa9\x1f\x0b\xbb\x8a\x63\x66\xf4\x5d\x51\x06\x9d' + b'\x40\x78\x43\xc8\xdf\x8e\x34\xa7\x4a\x0f\xd4\xeb\x8e\xf7\xcf' + b'\x8a\x6d\x1b\xec\x0a\xbc\xf3\x93\xe3\x48\xde\x90\xa3\x86\x7d' + b'\x1d\x74\x7a\xfa\x72\xbe\x6d\x3c\xfd\x1f\x25\x00\x4c\xc7\xc3' + b'\x18\xd4\x2d\xd0\xbd\xef\xc9\xf5\x71\x6c\xd3\xb1\x90\x20\x5c' + b'\x60\x8e\x21\x16\xd1\x9f\x90\xec\xdd\xe8\x1e\xeb\xda\xc6\x35' + b'\xc0\x62\x9d\x4c\xb1\xe4\xb9\x3e\x26\xe3\xff\x40\xfd\x23\xb3' + b'\xbe\x71\xfe\x7a\x99\xc9\xa8\x84\xbd\x8f\x0f\xb5\x89\x18\xfc' + b'\xc5\xc0\xc0\xe8\xf3\x53') return cert_der -- cgit v1.2.1