aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_trs.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove pointless free loop in X509_TRUST_cleanup()Kurt Cancemi2016-06-201-3/+0
| | | | | Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1194)
* Constify X509_TRUST_add method.FdaSilvaYY2016-06-151-4/+4
| | | | | Reviewed-by: Kurt Roeckx <kurt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/1215)
* Don't leak memory on X509_TRUST_add() error pathMatt Caswell2016-06-011-3/+9
| | | | | | The X509_TRUST_add() function was leaking an X509_TRUST object on error. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Copyright consolidation 09/10Rich Salz2016-05-171-54/+5
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Compat self-signed trust with reject-only aux dataViktor Dukhovni2016-01-311-22/+31
| | | | | | | | | | | | When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new supported certs and doubled test count from 38 to 76. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Check chain extensions also for trusted certificatesViktor Dukhovni2016-01-311-8/+11
| | | | | | | | | This includes basic constraints, key usages, issuer EKUs and auxiliary trust OIDs (given a trust suitably related to the intended purpose). Added tests and updated documentation. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Make it possible to check for explicit auxiliary trustViktor Dukhovni2016-01-291-1/+1
| | | | | | | | | | | | | | | By default X509_check_trust() trusts self-signed certificates from the trust store that have no explicit local trust/reject oids encapsulated as a "TRUSTED CERTIFICATE" object. (See the -addtrust and -trustout options of x509(1)). This commit adds a flag that makes it possible to distinguish between that implicit trust, and explicit auxiliary settings. With flags |= X509_TRUST_NO_SS_COMPAT, a certificate is only trusted via explicit trust settings. Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
* Comment side-effect only calls of X509_check_purposeViktor Dukhovni2016-01-271-0/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Remove /* foo.c */ commentsRich Salz2016-01-261-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>
* Reject when explicit trust EKU are set and none match.Viktor Dukhovni2016-01-201-0/+15
| | | | | | | | | | | | | | | Returning untrusted is enough for for full chains that end in self-signed roots, because when explicit trust is specified it suppresses the default blanket trust of self-signed objects. But for partial chains, this is not enough, because absent a similar trust-self-signed policy, non matching EKUs are indistinguishable from lack of EKU constraints. Therefore, failure to match any trusted purpose must trigger an explicit reject. Reviewed-by: Richard Levitte <levitte@openssl.org>
* Drop incorrect id == -1 case from X509_check_trustViktor Dukhovni2016-01-031-2/+1
| | | | Reviewed-by: Richard Levitte <levitte@openssl.org>
* Rename some BUF_xxx to OPENSSL_xxxRich Salz2015-12-161-1/+1
| | | | | | | | | Rename BUF_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} to OPENSSL_{strdup,strlcat,strlcpy,memdup,strndup,strnlen} Add #define's for the old names. Add CRYPTO_{memdup,strndup}, called by OPENSSL_{memdup,strndup} macros. Reviewed-by: Tim Hudson <tjh@openssl.org>
* make X509_CERT_AUX opaqueDr. Stephen Henson2015-08-311-0/+1
| | | | Reviewed-by: Rich Salz <rsalz@openssl.org>
* Identify and move common internal libcrypto header filesRichard Levitte2015-05-141-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>
* Use p==NULL not !p (in if statements, mainly)Rich Salz2015-05-111-3/+4
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Use safer sizeof variant in mallocRich Salz2015-05-041-1/+1
| | | | | | | | | | | | | 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>
* Add OSSL_NELEM macro.Dr. Stephen Henson2015-05-031-1/+1
| | | | | | | Add OSSL_NELEM macro to e_os.h to determine the number of elements in an array. Reviewed-by: Tim Hudson <tjh@openssl.org>
* util/mkstack.pl now generates entire safestack.hRich Salz2015-02-061-2/+0
| | | | | | | | | The mkstack.pl script now generates the entire safestack.h file. It generates output that follows the coding style. Also, removed all instances of the obsolete IMPLEMENT_STACK_OF macro. Reviewed-by: Andy Polyakov <appro@openssl.org>
* Run util/openssl-format-source -v -c .Matt Caswell2015-01-221-160/+181
| | | | Reviewed-by: Tim Hudson <tjh@openssl.org>
* Experimental support for partial chain verification: if an intermediateDr. Stephen Henson2010-02-251-0/+9
| | | | | certificate is explicitly trusted (using -addtrust option to x509 utility for example) the verification is sucessful even if the chain is not complete.
* Update obsolete email address...Dr. Stephen Henson2008-11-051-1/+1
|
* RFC 3161 compliant time stamp request creation, response generationUlf Möller2006-02-121-1/+2
| | | | | | | and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
* A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.Geoff Thorpe2003-10-291-2/+2
| | | | | | | | | | I have tried to convert 'len' type variable declarations to unsigned as a means to address these warnings when appropriate, but when in doubt I have used casts in the comparisons instead. The better solution (that would get us all lynched by API users) would be to go through and convert all the function prototypes and structure definitions to use unsigned variables except when signed is necessary. The proliferation of (signed) "int" for strictly non-negative uses is unfortunate.
* Add an entry for X509_TRUST_OBJECT_SIGN in trstandard[].Richard Levitte2003-06-111-0/+1
| | | | PR: 617
* Typo.Dr. Stephen Henson2001-10-201-1/+1
|
* Add missing variable length cipher flag for Blowfish.Dr. Stephen Henson2001-05-241-1/+2
| | | | | | Only use trust settings if either trust or reject settings are present, otherwise use compatibility mode. This stops root CAs being rejected if they have alias of keyid set.
* Purpose and trust setting functions for X509_STORE.Dr. Stephen Henson2001-05-101-0/+10
| | | | Tidy existing code.
* Enhance OCSP_request_verify() so it finds the signers certificateDr. Stephen Henson2001-02-261-1/+2
| | | | properly and supports several flags.
* Comment and indentationBodo Möller2001-01-281-4/+4
|
* Initial OCSP certificate verify. Not complete,Dr. Stephen Henson2001-01-171-0/+8
| | | | it just supports a "trusted OCSP global root CA".
* There have been a number of complaints from a number of sources that namesRichard Levitte2000-06-011-5/+5
| | | | | | | | | like Malloc, Realloc and especially Free conflict with already existing names on some operating systems or other packages. That is reason enough to change the names of the OpenSSL memory allocation macros to something that has a better chance of being unique, like prepending them with OPENSSL_. This change includes all the name changes needed throughout all C files.
* The previous commit to crypto/stack/*.[ch] pulled the type-safety stringsGeoff Thorpe2000-06-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | yet tighter, and also put some heat on the rest of the library by insisting (correctly) that compare callbacks used in stacks are prototyped with "const" parameters. This has led to a depth-first explosion of compiler warnings in the code where 1 constification has led to 3 or 4 more. Fortunately these have all been resolved to completion and the code seems cleaner as a result - in particular many of the _cmp() functions should have been prototyped with "const"s, and now are. There was one little problem however; X509_cmp() should by rights compare "const X509 *" pointers, and it is now declared as such. However, it's internal workings can involve recalculating hash values and extensions if they have not already been setup. Someone with a more intricate understanding of the flow control of X509 might be able to tighten this up, but for now - this seemed the obvious place to stop the "depth-first" constification of the code by using an evil cast (they have migrated all the way here from safestack.h). Fortunately, this is the only place in the code where this was required to complete these type-safety changes, and it's reasonably clear and commented, and seemed the least unacceptable of the options. Trying to take the constification further ends up exploding out considerably, and indeed leads directly into generalised ASN functions which are not likely to cooperate well with this.
* New compatability trust and purpose settings.Dr. Stephen Henson2000-03-071-8/+9
|
* More get0 et al. changes. Also provide fgrep targets in CHANGESBodo Möller2000-02-261-3/+3
| | | | where the new functions are mentioned.
* Rename functions for new convention.Dr. Stephen Henson2000-02-261-1/+1
|
* ispell (and minor modifications)Ulf Möller2000-02-031-1/+1
|
* Simplify the trust structure: basically zap the bit strings andDr. Stephen Henson1999-12-291-19/+42
| | | | represent everything by OIDs.
* Change the trust and purpose code so it doesn't need initDr. Stephen Henson1999-12-021-38/+71
| | | | either and has a static and dynamic mix.
* Oops! Commit died on me :-(Dr. Stephen Henson1999-11-271-0/+207