fix: micalg part of content-type

This commit is contained in:
theexiile1305 2024-10-09 12:10:03 +02:00
parent 46cf2ed498
commit b4370ded12
No known key found for this signature in database
GPG key ID: A1BDDE98F2BF6E40
2 changed files with 2 additions and 2 deletions

View file

@ -157,7 +157,7 @@ const (
MIMEAlternative MIMEType = "alternative" MIMEAlternative MIMEType = "alternative"
MIMEMixed MIMEType = "mixed" MIMEMixed MIMEType = "mixed"
MIMERelated MIMEType = "related" 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 // String is a standard method to convert an Charset into a printable format

View file

@ -173,7 +173,7 @@ func TestMsgWriter_writeMsg_SMime(t *testing.T) {
mw := &msgWriter{writer: &buf, charset: CharsetUTF8, encoder: mime.QEncoding} mw := &msgWriter{writer: &buf, charset: CharsetUTF8, encoder: mime.QEncoding}
mw.writeMsg(m) mw.writeMsg(m)
ms := buf.String() 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") t.Errorf("writeMsg failed. Expected PGP encoding header but didn't find it in message output")
} }
} }