diff options
author | Claudiu Belu <cbelu@cloudbasesolutions.com> | 2015-04-23 08:20:21 -0700 |
---|---|---|
committer | Claudiu Belu <cbelu@cloudbasesolutions.com> | 2015-04-28 12:21:53 +0300 |
commit | f88edaa6fc80e0c38727469ca69f0016de23db18 (patch) | |
tree | ebe82d14252292a826412ddc8a4d12354231c7ec /nova/crypto.py | |
parent | cacaa2fd1cef68569850a2719eec83f164603c25 (diff) | |
download | nova-f88edaa6fc80e0c38727469ca69f0016de23db18.tar.gz |
Fixes X509 keypair creation failure
Currently, the Subject created for the X509 certificate
is too long, resulting in exceptions and failing to
create the keypair.
This change shortens the Subject.
Unit test added to prove the issue's existence.
Issue found by: Andrey Kurilin
Co-authored-by: Andrey Kurilin <akurilin@mirantis.com>
Change-Id: I7885c120ce81a22d416f806779bf9a12092d5040
Closes-Bug: #1447653
Diffstat (limited to 'nova/crypto.py')
-rw-r--r-- | nova/crypto.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/crypto.py b/nova/crypto.py index 7194392e65..ecb9c0f8ca 100644 --- a/nova/crypto.py +++ b/nova/crypto.py @@ -365,9 +365,9 @@ def generate_x509_cert(user_id, project_id, bits=2048): return (private_key, signed_csr) -def generate_winrm_x509_cert(user_id, project_id, bits=2048): +def generate_winrm_x509_cert(user_id, bits=2048): """Generate a cert for passwordless auth for user in project.""" - subject = '/CN=%s-%s' % (project_id, user_id) + subject = '/CN=%s' % user_id upn = '%s@localhost' % user_id with utils.tempdir() as tmpdir: |