Commit Graph

30 Commits

Author SHA1 Message Date
Stephen Fox d51e300fcd Clarified comment for 'defaultRsaBits' constant.
That *is* a lot of bits.
2019-03-01 12:17:13 -05:00
Stephen Fox 7e1cbc6d89 Rename references to key pair name to comment.
Per the OpenSSH manual, the field is for a comment.
2019-03-01 10:00:29 -05:00
Stephen Fox 856810e82e Coalesce private key type switch cases per review feedback. 2019-02-28 09:56:11 -05:00
Stephen Fox 672b22bd13 Move 'CreateKeyPairConfig' closer to callers.
Per review feedback.
2019-02-28 09:44:25 -05:00
Stephen Fox 302828905d Move 'FromPrivateKeyConfig' closer to caller.
Per review feedback.
2019-02-28 09:42:20 -05:00
Stephen Fox ed06656613 Update 'authorizedKeysLine' doc per review feedback. 2019-02-28 09:40:00 -05:00
Stephen Fox 415ef26768 Removed TODO about key pair description per review feedback. 2019-02-28 09:30:30 -05:00
Stephen Fox 2ef6b9247d Initial take on code review feedback from @azr.
Do not use builder pattern or interfaces; stick to structs and
some basic functions.
2019-02-25 17:16:24 -05:00
Stephen Fox 2ab2ea6ef1 Fixed interface documentation typo. 2019-02-12 10:29:43 -05:00
Stephen Fox ed1d224b97 Remove defaultKeyPair type. Be more specific in errors. 2019-02-07 11:09:53 -05:00
chris marget 97268b3041 . 2019-02-06 15:05:56 -05:00
chris marget 3515afa994 better variable names in test function 2019-02-06 14:39:39 -05:00
chris marget 75bd3c6951 constants don't need to be [P]ublic 2019-02-06 14:36:38 -05:00
chris marget b476e54db1 whitespace 2019-02-06 14:34:09 -05:00
chris marget be01ca70f4 on error return empty defaultKeyPair{} rather than nil 2019-02-06 14:02:26 -05:00
chris marget 484aa4768f Remove unused keyheader data type 2019-02-06 13:58:26 -05:00
chris marget 13cc73d600 keypair parsing and testing 2019-02-06 13:46:55 -05:00
Stephen Fox 72b7d63a6a Restructured the SSH key pair's description.
Now include the key pair name (if any), and make it more "readable".
2019-02-05 13:37:09 -05:00
Stephen Fox 4b649f7ce4 Use individual key pair implementations.
This allows us to store more information about the key pair.
In particular, we can query the private key for its bits of
entropy - avoiding the possibility of hardcoding the wrong value.
2019-02-05 11:53:12 -05:00
Stephen Fox d7510ecdf7 Tweaked 'PublicKeyAuthorizedKeysLine()' comment. 2019-02-05 09:54:38 -05:00
Stephen Fox 58c692a587 Get bits from private key rather than user input. 2019-02-05 09:52:46 -05:00
Stephen Fox f3128143fa Simplified building of authorized_keys public key. 2019-02-04 14:27:59 -05:00
Stephen Fox f2c11b55be Renamed authorized_keys public key function. 2019-02-04 14:27:14 -05:00
Stephen Fox d465231e63 Fixed bad curve ecdsa curve bug. 2019-02-04 14:25:37 -05:00
Stephen Fox 9328c9f9e0 Renamed "new*" SSH key pair methods. 2019-02-04 14:12:18 -05:00
Stephen Fox f8db84334d Alias 'golang.org/x/crypto/ssh' as 'gossh'. 2019-02-04 12:29:47 -05:00
Stephen Fox 9a9bc18fab Renamed SSH key pair source files per pattern.
There appears to be a pattern of naming SSH key pair related
source files "*_key_pair*".
2019-02-04 12:25:00 -05:00
Stephen Fox 7f6b307dd6 Remove 'Ssh' suffix from 'KeyPairType' constants. 2019-02-04 12:23:42 -05:00
Stephen Fox c6ae8654d9 Moved SSH key pair code into 'helper/ssh'. 2019-02-04 12:21:58 -05:00
Adrien Delorme 5369c15459 helper: communicator.SSHFileSigner => ssh.FileSigner
* had to to avoid circular dependency
* this commit fixes #6631 ( esxi cannot be reached by ssh )
2018-08-29 14:40:33 +02:00