diff options
author | Geoff Thorpe <geoff@openssl.org> | 2000-06-01 02:36:58 +0000 |
---|---|---|
committer | Geoff Thorpe <geoff@openssl.org> | 2000-06-01 02:36:58 +0000 |
commit | ccd86b68ef7f9a5cfaaed4089bce29fdc5fe4219 (patch) | |
tree | a17b8dc9415fd53a48aad7152f08b2ede5a45d34 /util/mkdef.pl | |
parent | 7bb7043580900b8f06cb418b46004b755ff0fc96 (diff) |
The previous commit to crypto/stack/*.[ch] pulled the type-safety strings
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.
Diffstat (limited to 'util/mkdef.pl')
0 files changed, 0 insertions, 0 deletions