aboutsummaryrefslogtreecommitdiff
path: root/crypto/x509v3/pcy_tree.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-17Copyright consolidation 07/10Rich Salz1-54/+5
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-02-05Long overdue cleanup of X509 policy tree verificationViktor Dukhovni1-242/+216
Replace all magic numbers with #defined constants except in boolean functions that return 0 for failure and 1 for success. Avoid a couple memory leaks in error recovery code paths. Code style improvements. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-29Fix invalid policy detectionViktor Dukhovni1-2/+6
As a side-effect of opaque x509, ex_flags were looked up too early, before additional policy cache updates. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
2016-01-27Comment side-effect only calls of X509_check_purposeViktor Dukhovni1-1/+0
Reviewed-by: Rich Salz <rsalz@openssl.org>
2016-01-26Remove /* foo.c */ commentsRich Salz1-1/+0
This was done by the following find . -name '*.[ch]' | /tmp/pl where /tmp/pl is the following three-line script: print unless $. == 1 && m@/\* .*\.[ch] \*/@; close ARGV if eof; # Close file to reset $. And then some hand-editing of other files. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
2016-01-07Fix declarations and constification for inline stack.Dr. Stephen Henson1-1/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-11-09Continue standardising malloc style for libcryptoMatt Caswell1-6/+6
Continuing from previous commit ensure our style is consistent for malloc return checks. Reviewed-by: Kurt Roeckx <kurt@openssl.org>
2015-09-06Avoid direct X509 structure accessDr. Stephen Henson1-5/+9
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-03remove 0 assignments.Rich Salz1-5/+1
After openssl_zalloc, cleanup more "set to 0/NULL" assignments. Many are from github feedback. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-09-02Add and use OPENSSL_zallocRich Salz1-12/+5
There are many places (nearly 50) where we malloc and then memset. Add an OPENSSL_zalloc routine to encapsulate that. (Missed one conversion; thanks Richard) Also fixes GH328 Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-08-31Add X509_up_ref function.Dr. Stephen Henson1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-14Identify and move common internal libcrypto header filesRichard Levitte1-1/+1
There are header files in crypto/ that are used by a number of crypto/ submodules. Move those to crypto/include/internal and adapt the affected source code and Makefiles. The header files that got moved are: crypto/cryptolib.h crypto/md32_common.h Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-05-11Use p==NULL not !p (in if statements, mainly)Rich Salz1-1/+1
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-05memset, memcpy, sizeof consistency fixesRich Salz1-4/+1
Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr) for memset and memcpy. Remove needless casts for those functions. For memset, replace alternative forms of zero with 0. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-04Use safer sizeof variant in mallocRich Salz1-2/+2
For a local variable: TYPE *p; Allocations like this are "risky": p = OPENSSL_malloc(sizeof(TYPE)); if the type of p changes, and the malloc call isn't updated, you could get memory corruption. Instead do this: p = OPENSSL_malloc(sizeof(*p)); Also fixed a few memset() calls that I noticed while doing this. Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-05-01free NULL cleanup -- codaRich Salz1-2/+1
After the finale, the "real" final part. :) Do a recursive grep with "-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are an "if NULL" check that can be removed. Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-04-30free NULL cleanup 5aRich Salz1-7/+3
Don't check for NULL before calling a free routine. This gets X509_.*free: x509_name_ex_free X509_policy_tree_free X509_VERIFY_PARAM_free X509_STORE_free X509_STORE_CTX_free X509_PKEY_free X509_OBJECT_free_contents X509_LOOKUP_free X509_INFO_free Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-02-02Dead code cleanup: crypto/*.c, x509v3, demosRich Salz1-50/+1
Some of the #if 0 code in demo's was kept, but given helpful #ifdef names, to show more sample code. Reviewed-by: Andy Polyakov <appro@openssl.org>
2015-01-29clang on Linux x86_64 complains about unreachable code.Richard Levitte1-1/+1
Reviewed-by: Rich Salz <rsalz@openssl.org>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell1-708/+665
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-01-06Further comment amendments to preserve formatting prior to source reformatMatt Caswell1-1/+2
Reviewed-by: Tim Hudson <tjh@openssl.org>
2014-12-30mark all block comments that need format preserving so thatTim Hudson1-1/+2
indent will not alter them when reformatting comments Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
2014-12-10tree_print: check for NULL after allocating errJonas Maebe1-0/+2
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Matt Caswell <matt@openssl.org>
2013-09-05misspellings fixes by https://github.com/vlajos/misspell_fixerVeres Lajos1-1/+1
2010-06-12Fix warnings.Ben Laurie1-2/+1
2009-04-03Merge from 1.0.0-stable branch.Dr. Stephen Henson1-1/+1
2008-11-05Update obsolete email address...Dr. Stephen Henson1-1/+1
2008-08-12Support for policy mappings extension.Dr. Stephen Henson1-27/+206
Delete X509_POLICY_REF code. Fix handling of invalid policy extensions to return the correct error. Add command line option to inhibit policy mappings.
2008-08-02Make explicit_policy handling match expected RFC3280 behaviour.Dr. Stephen Henson1-4/+4
2008-07-30Policy validation fixes.Dr. Stephen Henson1-2/+3
Inhibit any policy count should ignore self issued certificates. Require explicit policy is the number certificate before an explict policy is required.
2008-07-13Zero is a valid value for any_skip and map_skipDr. Stephen Henson1-2/+2
2008-07-13X509 verification fixes.Dr. Stephen Henson1-3/+4
Ignore self issued certificates when checking path length constraints. Duplicate OIDs in policy tree in case they are allocated. Use anyPolicy from certificate cache and not current tree level.
2007-09-07Change safestack reimplementation to match 0.9.8.Dr. Stephen Henson1-2/+2
Fix additional gcc 4.2 value not used warnings.
2006-11-27Add RFC 3779 support.Ben Laurie1-0/+10
2006-10-05Typo.Dr. Stephen Henson1-1/+1
2006-01-29add additional checks + cleanupNils Larsch1-0/+1
Submitted by: David Hartman <david_hartman@symantec.com>
2004-04-01Don't use C++ reserved word.Dr. Stephen Henson1-6/+6
2004-03-25Fix loads of warnings in policy code.Dr. Stephen Henson1-3/+3
I'll remember to try to compile this with warnings enabled next time :-)
2004-03-25Remove some warnings.Geoff Thorpe1-2/+2
2004-03-23Initial support for certificate policy checking and evaluation.Dr. Stephen Henson1-0/+681
This is currently *very* experimental and needs to be more fully integrated with the main verification code.