~ubuntu-branches/ubuntu/lucid/seamonkey/lucid-security

« back to all changes in this revision

Viewing changes to security/nss/lib/smime/smimeutil.c

  • Committer: Bazaar Package Importer
  • Author(s): Fabien Tassin
  • Date: 2008-07-29 21:29:02 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080729212902-spm9kpvchp9udwbw
Tags: 1.1.11+nobinonly-0ubuntu1
* New security upstream release: 1.1.11 (LP: #218534)
  Fixes USN-602-1, USN-619-1, USN-623-1 and USN-629-1
* Refresh diverged patch:
  - update debian/patches/80_security_build.patch
* Fix FTBFS with missing -lfontconfig
  - add debian/patches/11_fix_ftbfs_with_fontconfig.patch
  - update debian/patches/series
* Build with default gcc (hardy: 4.2, intrepid: 4.3)
  - update debian/rules
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
/*
38
38
 * Stuff specific to S/MIME policy and interoperability.
39
39
 *
40
 
 * $Id: smimeutil.c,v 1.16.28.4 2006/08/25 23:00:29 alexei.volkov.bugs%sun.com Exp $
 
40
 * $Id: smimeutil.c,v 1.16.28.5 2007/05/07 22:46:06 nelson%bolyard.com Exp $
41
41
 */
42
42
 
43
43
#include "secmime.h"
351
351
         * 2 NULLs as equal and NULL and non-NULL as not equal), we could
352
352
         * use that here instead of all of the following comparison code.
353
353
         */
354
 
        if (cap->parameters.data == NULL && smime_cipher_map[i].parms == NULL)
355
 
            break;      /* both empty: bingo */
356
 
 
357
 
        if (cap->parameters.data != NULL && smime_cipher_map[i].parms != NULL &&
 
354
        if (!smime_cipher_map[i].parms) { 
 
355
            if (!cap->parameters.data || !cap->parameters.len)
 
356
                break;  /* both empty: bingo */
 
357
            if (cap->parameters.len     == 2  &&
 
358
                cap->parameters.data[0] == SEC_ASN1_NULL &&
 
359
                cap->parameters.data[1] == 0) 
 
360
                break;  /* DER NULL == NULL, bingo */
 
361
        } else if (cap->parameters.data != NULL && 
358
362
            cap->parameters.len == smime_cipher_map[i].parms->len &&
359
363
            PORT_Memcmp (cap->parameters.data, smime_cipher_map[i].parms->data,
360
364
                             cap->parameters.len) == 0)
365
369
 
366
370
    if (i == smime_cipher_map_count)
367
371
        return 0;                               /* no match found */
368
 
    else
369
 
        return smime_cipher_map[i].cipher;      /* match found, point to cipher */
 
372
    return smime_cipher_map[i].cipher;  /* match found, point to cipher */
370
373
}
371
374
 
372
375
/*