Skip to content
Snippets Groups Projects
Commit 6f7ce3f4 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

SSH: Work around issue with dynamic_cast.


It has been observed that on MacOs, a dynamic_cast from
Botan::Public_Key to Botan::RSA_PublicKey reproducibly fails even though
it should definitely succeed. This happens with both gcc and clang on
different Macs, but on no other platform. The problem could not be
reproduced with an example project.
The workaround is to move the allocation of the respective object from
the client side to the Botan library itself. In addition, the following
actions were taken to guard against similar problems in the future:
    - Also move to Botan the allocations of all other objects that are
potentially dynamically cast.
    - Use shared pointers for these objects, so the deallocation also
happens inside Botan.

Change-Id: Ie595a56a239a41e2629b6ff631de59910b8244dd
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 62422de5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment