~ubuntu-branches/ubuntu/raring/nss/raring

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/certhigh/certvfypkix.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2011-11-30 11:16:39 UTC
  • mfrom: (1.1.16) (2.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20111130111639-5mt2nwo12iyvznhz
Tags: 3.13.1.with.ckbi.1.88-1ubuntu1
* Merge from Debian testing. Remaining changes:
  - Ship the main SO files in an unversioned binary, as we don't have
    versioned SO's in Ubuntu. Maintain a transitional versioned binary
    package containing the versioned symlinks, to maintain compatibility
    with Debian
    * update control, rules
    * mass rename libnss3-1d* => libnss3*
  - Fix postinst-must-call-ldconfig - dh_makeshlibs doesn't seem to add
    the maintainer script hooks with the unversioned SO files, so add
    them manually
    * add libnss3.postinst, libnss3.postrm
  - rules: Add support for mozilla-devscripts.
  - control: Change Vcs-* to XS-Debian-Vcs-*.
* control: Fix typo (LP: #855424)
* Bugs fixed by the merge:
  - Using dh now (LP: #613477)
  - Adds 85_security_load.patch (LP: #315096)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1986
1986
    return &certRev_PKIX_Verify_Nist_Policy;
1987
1987
}
1988
1988
 
 
1989
CERTRevocationFlags *
 
1990
CERT_AllocCERTRevocationFlags(
 
1991
    PRUint32 number_leaf_methods, PRUint32 number_leaf_pref_methods,
 
1992
    PRUint32 number_chain_methods, PRUint32 number_chain_pref_methods)
 
1993
{
 
1994
    CERTRevocationFlags *flags;
 
1995
    
 
1996
    flags = PORT_New(CERTRevocationFlags);
 
1997
    if (!flags)
 
1998
        return(NULL);
 
1999
    
 
2000
    flags->leafTests.number_of_defined_methods = number_leaf_methods;
 
2001
    flags->leafTests.cert_rev_flags_per_method = 
 
2002
        PORT_NewArray(PRUint64, number_leaf_methods);
 
2003
 
 
2004
    flags->leafTests.number_of_preferred_methods = number_leaf_pref_methods;
 
2005
    flags->leafTests.preferred_methods = 
 
2006
        PORT_NewArray(CERTRevocationMethodIndex, number_leaf_pref_methods);
 
2007
 
 
2008
    flags->chainTests.number_of_defined_methods = number_chain_methods;
 
2009
    flags->chainTests.cert_rev_flags_per_method = 
 
2010
        PORT_NewArray(PRUint64, number_chain_methods);
 
2011
 
 
2012
    flags->chainTests.number_of_preferred_methods = number_chain_pref_methods;
 
2013
    flags->chainTests.preferred_methods = 
 
2014
        PORT_NewArray(CERTRevocationMethodIndex, number_chain_pref_methods);
 
2015
    
 
2016
    if (!flags->leafTests.cert_rev_flags_per_method
 
2017
        || !flags->leafTests.preferred_methods
 
2018
        || !flags->chainTests.cert_rev_flags_per_method
 
2019
        || !flags->chainTests.preferred_methods) {
 
2020
        CERT_DestroyCERTRevocationFlags(flags);
 
2021
        return (NULL);
 
2022
    }
 
2023
    
 
2024
    return flags;
 
2025
}
 
2026
 
 
2027
void CERT_DestroyCERTRevocationFlags(CERTRevocationFlags *flags)
 
2028
{
 
2029
    if (!flags)
 
2030
        return;
 
2031
  
 
2032
    if (flags->leafTests.cert_rev_flags_per_method)
 
2033
        PORT_Free(flags->leafTests.cert_rev_flags_per_method);
 
2034
 
 
2035
    if (flags->leafTests.preferred_methods)
 
2036
        PORT_Free(flags->leafTests.preferred_methods);
 
2037
    
 
2038
    if (flags->chainTests.cert_rev_flags_per_method)
 
2039
        PORT_Free(flags->chainTests.cert_rev_flags_per_method);
 
2040
 
 
2041
    if (flags->chainTests.preferred_methods)
 
2042
        PORT_Free(flags->chainTests.preferred_methods);
 
2043
 
 
2044
     PORT_Free(flags);
 
2045
}
1989
2046
 
1990
2047
/*
1991
2048
 * CERT_PKIXVerifyCert