TaurusTLS uses dynamic OpenSSL routines loading for majority desktop targets (the conditional definition "OPENSSL_STATIC_LINK_MODEL" is not defined).
The OpenSSL routines are loaded to the global variables and become accessible from the user code. For some situations these variable can be reassigned to internal function which can:
- raise exception in case if the OpenSSL routine is not published by OpenSSL library
- redirect call to another function in case of forward or backward compatibility.
These function must be called in C-style calling convention. However, not every of such functions is declared with cdec directive. This may lead to incorrect parameters passing to the OpenSSL routines in specific conditions.
Action items:
- add
cdecl directive to all internal Error, Forward and Backward compatibility functions
- correct function assignment to allow compile do strict type check in thr Load functions.
currently assignment looks like: ERR_GET_REASON := @ERR_ERR_GET_REASON; it should be corrected to ERR_GET_REASON := ERR_ERR_GET_REASON; to allow compiler validate procedural type in such assignments.