зеркало из https://github.com/mozilla/pjs.git
b=148232 Support application/pkcs7-signature mime type on incoming S/Mime messages.
r=ducarroz sr=darin
This commit is contained in:
Родитель
de37d9d76f
Коммит
ae793a7bc5
|
@ -537,7 +537,11 @@ mime_find_class (const char *content_type, MimeHeaders *hdrs,
|
|||
: 0);
|
||||
|
||||
if (proto
|
||||
&& (!nsCRT::strcasecmp(proto, APPLICATION_XPKCS7_SIGNATURE)
|
||||
&& (
|
||||
(/* is a signature */
|
||||
!nsCRT::strcasecmp(proto, APPLICATION_XPKCS7_SIGNATURE)
|
||||
||
|
||||
!nsCRT::strcasecmp(proto, APPLICATION_PKCS7_SIGNATURE))
|
||||
&& micalg
|
||||
&& (!nsCRT::strcasecmp(micalg, PARAM_MICALG_MD5) ||
|
||||
!nsCRT::strcasecmp(micalg, PARAM_MICALG_SHA1) ||
|
||||
|
|
|
@ -344,7 +344,9 @@ MimeMultCMS_sig_init (void *crypto_closure,
|
|||
ct = MimeHeaders_get (signature_hdrs, HEADER_CONTENT_TYPE, PR_TRUE, PR_FALSE);
|
||||
|
||||
/* Verify that the signature object is of the right type. */
|
||||
if (!ct || (nsCRT::strcasecmp(ct, APPLICATION_XPKCS7_SIGNATURE))) {
|
||||
if (!ct || /* is not a signature type */
|
||||
(nsCRT::strcasecmp(ct, APPLICATION_XPKCS7_SIGNATURE) != 0
|
||||
&& nsCRT::strcasecmp(ct, APPLICATION_PKCS7_SIGNATURE) != 0)) {
|
||||
status = -1; /* #### error msg about bogus message */
|
||||
}
|
||||
PR_FREEIF(ct);
|
||||
|
|
|
@ -85,6 +85,7 @@
|
|||
#define APPLICATION_XPKCS7_MIME "application/x-pkcs7-mime"
|
||||
#define APPLICATION_PKCS7_MIME "application/pkcs7-mime"
|
||||
#define APPLICATION_XPKCS7_SIGNATURE "application/x-pkcs7-signature"
|
||||
#define APPLICATION_PKCS7_SIGNATURE "application/pkcs7-signature"
|
||||
#define APPLICATION_WWW_FORM_URLENCODED "application/x-www-form-urlencoded"
|
||||
#define APPLICATION_OLEOBJECT "application/oleobject"
|
||||
#define APPLICATION_OLEOBJECT2 "application/x-oleobject"
|
||||
|
|
Загрузка…
Ссылка в новой задаче