Drop regex for canonicalization (#102)

* Drop regex for canonicalization

* Fix CI
This commit is contained in:
wussler 2020-12-01 18:09:25 +01:00 committed by GitHub
parent 5b1a42c2cd
commit 385e6d21d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 19 deletions

View file

@ -2,7 +2,6 @@ package helper
import (
"github.com/ProtonMail/gopenpgp/v2/crypto"
"github.com/ProtonMail/gopenpgp/v2/internal"
"github.com/pkg/errors"
)
@ -49,7 +48,6 @@ func VerifyCleartextMessageArmored(publicKey, armored string, verifyTime int64)
// SignCleartextMessage signs text given a private keyring, canonicalizes and
// trims the newlines, and returns the PGP-compliant special armoring.
func SignCleartextMessage(keyRing *crypto.KeyRing, text string) (string, error) {
text = internal.TrimWhitespace(text)
message := crypto.NewPlainMessageFromString(text)
signature, err := keyRing.SignDetached(message)