We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe9ae78 commit 59ba03fCopy full SHA for 59ba03f
mantle/network/ssh.go
@@ -15,8 +15,9 @@
15
package network
16
17
import (
18
+ "crypto/ecdsa"
19
+ "crypto/elliptic"
20
"crypto/rand"
- "crypto/rsa"
21
"fmt"
22
"io/ioutil"
23
"net"
@@ -30,7 +31,6 @@ import (
30
31
const (
32
defaultPort = 22
33
defaultUser = "core"
- rsaKeySize = 2048
34
)
35
36
// DefaultSSHDir is a process-global path that can be set, and
@@ -57,7 +57,7 @@ type SSHAgent struct {
57
// NewSSHAgent constructs a new SSHAgent using dialer to create ssh
58
// connections.
59
func NewSSHAgent(dialer Dialer) (*SSHAgent, error) {
60
- key, err := rsa.GenerateKey(rand.Reader, rsaKeySize)
+ key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader)
61
if err != nil {
62
return nil, err
63
}
0 commit comments