Add unit test for importing ed25519 ssh key

Back in change Id4a4e1ae4c0acd40c1fc32c3b82a8d8a62d4624d we bumped our
required cryptography package version to one that has support for
ed25519 ssh keys.

This adds a unit test to assert that ed25519 ssh key import works.

Related-Bug: #1555521

Change-Id: I5b37caa6d3b1b209722e9d74b127ea2f29b37563
This commit is contained in:
melanie witt 2021-05-04 22:29:51 +00:00
parent 7953c0197d
commit 67f79fdb44
1 changed files with 6 additions and 0 deletions

View File

@ -218,6 +218,12 @@ class ImportKeypairTestCase(KeypairAPITestCase, CreateImportSharedTestMixIn):
def test_success_ssh(self):
self._check_success()
def test_success_ssh_ed25519(self):
self.pub_key = ('ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFl6u75BTi8xGtSPm'
'1yVJuLE/oMtCOuEMJJnBSuZEdXz')
self.fingerprint = '1a:1d:a7:2c:4c:ff:15:c4:70:13:38:b6:ac:4c:dc:12'
self._check_success()
def test_success_x509(self):
self.keypair_type = keypair_obj.KEYPAIR_TYPE_X509
certif, fingerprint = fake_crypto.get_x509_cert_and_fingerprint()