Renamed "new*" SSH key pair methods.

This commit is contained in:
Stephen Fox 2019-02-04 14:12:18 -05:00
parent ea2a7c3fe9
commit 9328c9f9e0
1 changed files with 6 additions and 6 deletions

View File

@ -109,16 +109,16 @@ func (o *defaultKeyPairBuilder) SetName(name string) KeyPairBuilder {
func (o *defaultKeyPairBuilder) Build() (KeyPair, error) {
switch o.kind {
case Rsa:
return o.newRsaSshKeyPair()
return o.newRsaKeyPair()
case Ecdsa:
// Default case.
}
return o.newEcdsaSshKeyPair()
return o.newEcdsaKeyPair()
}
// newEcdsaSshKeyPair returns a new ECDSA SSH key pair.
func (o *defaultKeyPairBuilder) newEcdsaSshKeyPair() (KeyPair, error) {
// newEcdsaKeyPair returns a new ECDSA SSH key pair.
func (o *defaultKeyPairBuilder) newEcdsaKeyPair() (KeyPair, error) {
var curve elliptic.Curve
switch o.bits {
@ -164,8 +164,8 @@ func (o *defaultKeyPairBuilder) newEcdsaSshKeyPair() (KeyPair, error) {
}, nil
}
// newRsaSshKeyPair returns a new RSA SSH key pair.
func (o *defaultKeyPairBuilder) newRsaSshKeyPair() (KeyPair, error) {
// newRsaKeyPair returns a new RSA SSH key pair.
func (o *defaultKeyPairBuilder) newRsaKeyPair() (KeyPair, error) {
if o.bits == 0 {
o.bits = defaultRsaBits
}