ccd86b68ef
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. |
||
---|---|---|
.. | ||
.cvsignore | ||
by_dir.c | ||
by_file.c | ||
Makefile.ssl | ||
x509.h | ||
x509_att.c | ||
x509_cmp.c | ||
x509_d2.c | ||
x509_def.c | ||
x509_err.c | ||
x509_ext.c | ||
x509_lu.c | ||
x509_obj.c | ||
x509_r2x.c | ||
x509_req.c | ||
x509_set.c | ||
x509_trs.c | ||
x509_txt.c | ||
x509_v3.c | ||
x509_vfy.c | ||
x509_vfy.h | ||
x509name.c | ||
x509rset.c | ||
x509spki.c | ||
x509type.c | ||
x_all.c |