Skip to content

Correct declaration in internal Error, Forward and Backward compatibility function is needed #113

@tregubovav-dev

Description

@tregubovav-dev

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions