This commit is contained in:
Samuel Lorch 2021-09-06 15:55:55 +02:00
parent 0538e86ddd
commit 28e2ccf7e4
2 changed files with 9 additions and 22 deletions

View file

@ -146,10 +146,7 @@ func (c *Client) Login(ctx context.Context) error {
}
// Validate that this Publickey that the Server gave us actually Matches our Privatekey
randomString, err := randStringBytesRmndr(50)
if err != nil {
return fmt.Errorf("Generating Random String as PublicKey Validation Message: %w", err)
}
randomString := randStringBytesRmndr(50)
armor, err := helper.EncryptMessageArmored(user.GPGKey.ArmoredKey, randomString)
if err != nil {
return fmt.Errorf("Encryping PublicKey Validation Message: %w", err)