0001-utils-fix-handling-of-multiple-private-keys-fixes-11.patch
mellon/utils.py | ||
---|---|---|
54 | 54 |
private_key = app_settings.PRIVATE_KEY |
55 | 55 |
private_key_password = app_settings.PRIVATE_KEY_PASSWORD |
56 | 56 |
elif app_settings.PRIVATE_KEYS: |
57 |
private_key = app_settings.PRIVATE_KEYS |
|
57 |
private_key = app_settings.PRIVATE_KEYS[0]
|
|
58 | 58 |
private_key_password = None |
59 | 59 |
if isinstance(private_key, (tuple, list)): |
60 | 60 |
private_key_password = private_key[1] |
... | ... | |
65 | 65 |
server = lasso.Server.newFromBuffers(metadata, private_key_content=private_key, |
66 | 66 |
private_key_password=private_key_password) |
67 | 67 |
server.setEncryptionPrivateKeyWithPassword(private_key, private_key_password) |
68 |
for key in app_settings.PRIVATE_KEYS: |
|
68 |
private_keys = app_settings.PRIVATE_KEYS |
|
69 |
# skip first key if it is already loaded |
|
70 |
if not app_settings.PRIVATE_KEY: |
|
71 |
private_keys = app_settings.PRIVATE_KEYS[1:] |
|
72 |
for key in private_keys: |
|
69 | 73 |
password = None |
70 | 74 |
if isinstance(key, (tuple, list)): |
71 | 75 |
password = key[1] |
72 |
- |