diff --git a/encoding.go b/encoding.go index 77243fc..dbe57ee 100644 --- a/encoding.go +++ b/encoding.go @@ -157,7 +157,7 @@ const ( MIMEAlternative MIMEType = "alternative" MIMEMixed MIMEType = "mixed" MIMERelated MIMEType = "related" - MIMESMime MIMEType = `signed; protocol="application/pkcs7-signature"; micalg=sha256` + MIMESMime MIMEType = `signed; protocol="application/pkcs7-signature"; micalg=sha-256` ) // String is a standard method to convert an Charset into a printable format diff --git a/msgwriter_test.go b/msgwriter_test.go index ca1a982..3466199 100644 --- a/msgwriter_test.go +++ b/msgwriter_test.go @@ -173,7 +173,7 @@ func TestMsgWriter_writeMsg_SMime(t *testing.T) { mw := &msgWriter{writer: &buf, charset: CharsetUTF8, encoder: mime.QEncoding} mw.writeMsg(m) ms := buf.String() - if !strings.Contains(ms, `multipart/signed; protocol="application/pkcs7-signature"; micalg=sha256;`) { + if !strings.Contains(ms, `multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256;`) { t.Errorf("writeMsg failed. Expected PGP encoding header but didn't find it in message output") } }