Commit Graph

2 Commits (cae9d633b06a62cdc40df0b5fc96db1f1df6d4e9)

Author SHA1 Message Date
Felix Fontein 8f10db8552
Do fail instead of regenerate for password protected and invalid keys. (#65638) 5 years ago
Maxim Babushkin da73bbd73c openssh_keypair - Add logic to handle password protected or broken key (#64436)
* The ssh key may be created manually prior the task execution with a
  passphrase. And the task will be executed on the same key.
* The ssh key may be broken and not usable.

The module will check the private key and if the key is password
protected or broken, it will be overridden.
The check of the ssh key performed by retrieve the public key from the
private key.

Set the "self.force" check before the "isPrivateKeyValid" check.
In case of any issue with the "isPrivateKeyValid" function, the user
will be able to force the regeneration of the key with the "force: yes"
argument.
5 years ago