mirror of
https://github.com/openssl/openssl.git
synced 2024-12-03 05:41:46 +08:00
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. |
||
---|---|---|
.. | ||
p7 | ||
t | ||
.cvsignore | ||
bio_ber.c | ||
dec.c | ||
des.pem | ||
doc | ||
enc.c | ||
es1.pem | ||
example.c | ||
example.h | ||
info.pem | ||
infokey.pem | ||
Makefile.ssl | ||
pk7_attr.c | ||
pk7_dgst.c | ||
pk7_doit.c | ||
pk7_enc.c | ||
pk7_lib.c | ||
pk7_mime.c | ||
pk7_smime.c | ||
pkcs7.h | ||
pkcs7err.c | ||
server.pem | ||
sign.c | ||
verify.c |