Skip to content

Commit

Permalink
Merge branch 'cloud-barista:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
taking authored Oct 30, 2024
2 parents 97cdd16 + 6c03445 commit 4d35b5e
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions server/pkg/api/rest/controller/connectionInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ func checkPort(port string) error {
}

func encryptSecrets(connectionInfo *model.ConnectionInfo) (*model.ConnectionInfo, error) {
rsaEncryptedSSHPort, err := rsautil.EncryptWithPublicKey([]byte(connectionInfo.SSHPort), serverCommon.PubKey)
if err != nil {
errMsg := "error occurred while encrypting the ssh port (" + err.Error() + ")"
logger.Println(logger.ERROR, true, errMsg)
return nil, errors.New(errMsg)
}
base64EncodedEncryptedSSHPort := base64.StdEncoding.EncodeToString(rsaEncryptedSSHPort)
connectionInfo.SSHPort = base64EncodedEncryptedSSHPort

rsaEncryptedUser, err := rsautil.EncryptWithPublicKey([]byte(connectionInfo.User), serverCommon.PubKey)
if err != nil {
errMsg := "error occurred while encrypting the user (" + err.Error() + ")"
Expand Down

0 comments on commit 4d35b5e

Please sign in to comment.