aboutsummaryrefslogtreecommitdiff
path: root/crypto/x509/x509_trs.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-20Remove pointless free loop in X509_TRUST_cleanup()Kurt Cancemi1-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)
2016-06-15Constify X509_TRUST_add method.FdaSilvaYY1-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)
2016-06-01Don't leak memory on X509_TRUST_add() error pathMatt Caswell1-3/+9
The X509_TRUST_add() function was leaking an X509_TRUST object on error. Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-05-17Copyright consolidation 09/10Rich Salz1-54/+5
Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-01-31Compat self-signed trust with reject-only aux dataViktor Dukhovni1-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>
2016-01-31Check chain extensions also for trusted certificatesViktor Dukhovni1-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>
2016-01-29Make it possible to check for explicit auxiliary trustViktor Dukhovni1-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>
2016-01-27Comment side-effect only calls of X509_check_purposeViktor Dukhovni1-0/+1
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-20Reject when explicit trust EKU are set and none match.Viktor Dukhovni1-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>
2016-01-03Drop incorrect id == -1 case from X509_check_trustViktor Dukhovni1-2/+1
Reviewed-by: Richard Levitte <levitte@openssl.org>
2015-12-16Rename some BUF_xxx to OPENSSL_xxxRich Salz1-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>
2015-08-31make X509_CERT_AUX opaqueDr. Stephen Henson1-0/+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-3/+4
Reviewed-by: Tim Hudson <tjh@openssl.org>
2015-05-04Use safer sizeof variant in mallocRich Salz1-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>
2015-05-03Add OSSL_NELEM macro.Dr. Stephen Henson1-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>
2015-02-06util/mkstack.pl now generates entire safestack.hRich Salz1-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>
2015-01-22Run util/openssl-format-source -v -c .Matt Caswell1-160/+181
Reviewed-by: Tim Hudson <tjh@openssl.org>
2010-02-25Experimental support for partial chain verification: if an intermediateDr. Stephen Henson1-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.
2008-11-05Update obsolete email address...Dr. Stephen Henson1-1/+1
2006-02-12RFC 3161 compliant time stamp request creation, response generationUlf Möller1-1/+2
and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
2003-10-29A general spring-cleaning (in autumn) to fix up signed/unsigned warnings.Geoff Thorpe1-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.
2003-06-11Add an entry for X509_TRUST_OBJECT_SIGN in trstandard[].Richard Levitte1-0/+1
PR: 617
2001-10-20Typo.Dr. Stephen Henson1-1/+1
2001-05-24Add missing variable length cipher flag for Blowfish.Dr. Stephen Henson1-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.
2001-05-10Purpose and trust setting functions for X509_STORE.Dr. Stephen Henson1-0/+10
Tidy existing code.
2001-02-26Enhance OCSP_request_verify() so it finds the signers certificateDr. Stephen Henson1-1/+2
properly and supports several flags.
2001-01-28Comment and indentationBodo Möller1-4/+4
2001-01-17Initial OCSP certificate verify. Not complete,Dr. Stephen Henson1-0/+8
it just supports a "trusted OCSP global root CA".
2000-06-01There have been a number of complaints from a number of sources that namesRichard Levitte1-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.
2000-06-01The previous commit to crypto/stack/*.[ch] pulled the type-safety stringsGeoff Thorpe1-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.
2000-03-07New compatability trust and purpose settings.Dr. Stephen Henson1-8/+9
2000-02-26More get0 et al. changes. Also provide fgrep targets in CHANGESBodo Möller1-3/+3
where the new functions are mentioned.
2000-02-26Rename functions for new convention.Dr. Stephen Henson1-1/+1
2000-02-03ispell (and minor modifications)Ulf Möller1-1/+1
1999-12-29Simplify the trust structure: basically zap the bit strings andDr. Stephen Henson1-19/+42
represent everything by OIDs.
1999-12-02Change the trust and purpose code so it doesn't need initDr. Stephen Henson1-38/+71
either and has a static and dynamic mix.
1999-11-27Oops! Commit died on me :-(Dr. Stephen Henson1-0/+207