OLD | NEW |
1 /* This Source Code Form is subject to the terms of the Mozilla Public | 1 /* This Source Code Form is subject to the terms of the Mozilla Public |
2 * License, v. 2.0. If a copy of the MPL was not distributed with this | 2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
4 | 4 |
5 /* | 5 /* |
6 * Stuff specific to S/MIME policy and interoperability. | 6 * Stuff specific to S/MIME policy and interoperability. |
7 * Depends on PKCS7, but there should be no dependency the other way around. | 7 * Depends on PKCS7, but there should be no dependency the other way around. |
8 */ | 8 */ |
9 | 9 |
10 #include "secmime.h" | 10 #include "secmime.h" |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 cipher = smime_cipher_maps[i].cipher; | 354 cipher = smime_cipher_maps[i].cipher; |
355 | 355 |
356 cap->cipher = cipher; | 356 cap->cipher = cipher; |
357 cap->capIDTag = algtag; | 357 cap->capIDTag = algtag; |
358 } | 358 } |
359 | 359 |
360 | 360 |
361 static long | 361 static long |
362 smime_choose_cipher (CERTCertificate *scert, CERTCertificate **rcerts) | 362 smime_choose_cipher (CERTCertificate *scert, CERTCertificate **rcerts) |
363 { | 363 { |
364 PRArenaPool *poolp; | 364 PLArenaPool *poolp; |
365 long chosen_cipher; | 365 long chosen_cipher; |
366 int *cipher_abilities; | 366 int *cipher_abilities; |
367 int *cipher_votes; | 367 int *cipher_votes; |
368 int strong_mapi; | 368 int strong_mapi; |
369 int rcount, mapi, max; | 369 int rcount, mapi, max; |
370 | 370 |
371 if (smime_policy_bits == 0) { | 371 if (smime_policy_bits == 0) { |
372 PORT_SetError (SEC_ERROR_BAD_EXPORT_ALGORITHM); | 372 PORT_SetError (SEC_ERROR_BAD_EXPORT_ALGORITHM); |
373 return -1; | 373 return -1; |
374 } | 374 } |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 | 813 |
814 /* | 814 /* |
815 * Add the email profile. Again, if it fails for some reason, | 815 * Add the email profile. Again, if it fails for some reason, |
816 * may as well not give up altogether -- just assert. | 816 * may as well not give up altogether -- just assert. |
817 */ | 817 */ |
818 rv = smime_add_profile (ecert, cinfo); | 818 rv = smime_add_profile (ecert, cinfo); |
819 PORT_Assert (rv == SECSuccess); | 819 PORT_Assert (rv == SECSuccess); |
820 | 820 |
821 return cinfo; | 821 return cinfo; |
822 } | 822 } |
OLD | NEW |