Skip to content

Commit

Permalink
Remove cleartext Encode header argument #239 (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdosch authored Nov 8, 2024
1 parent b97cc3c commit f8b3f21
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openpgp/clearsign/clearsign.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ func (d *dashEscaper) Close() (err error) {

// Encode returns a WriteCloser which will clear-sign a message with privateKey
// and write it to w. If config is nil, sensible defaults are used.
func Encode(w io.Writer, privateKey *packet.PrivateKey, config *packet.Config, headers map[string]string) (plaintext io.WriteCloser, err error) {
func Encode(w io.Writer, privateKey *packet.PrivateKey, config *packet.Config) (plaintext io.WriteCloser, err error) {
return EncodeMulti(w, []*packet.PrivateKey{privateKey}, config)
}

Expand Down
4 changes: 2 additions & 2 deletions openpgp/clearsign/clearsign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func TestSigning(t *testing.T) {
for i, test := range signingTests {
var buf bytes.Buffer

plaintext, err := Encode(&buf, keyring[0].PrivateKey, allowAllAlgorithmsConfig, nil)
plaintext, err := Encode(&buf, keyring[0].PrivateKey, allowAllAlgorithmsConfig)
if err != nil {
t.Errorf("#%d: error from Encode: %s", i, err)
continue
Expand Down Expand Up @@ -155,7 +155,7 @@ func TestSigningInterop(t *testing.T) {
}

var buf bytes.Buffer
plaintext, err := Encode(&buf, keyring[0].PrivateKey, nil, nil)
plaintext, err := Encode(&buf, keyring[0].PrivateKey, nil)
if err != nil {
t.Errorf("error from Encode")
}
Expand Down

0 comments on commit f8b3f21

Please sign in to comment.