[omniORB] SSL Transport and ORB_init
Duncan Grisby
duncan at grisby.org
Fri Nov 1 10:02:04 UTC 2024
On Wed, 2024-10-30 at 17:36 -0400, Christopher Fahey via omniORB-list
wrote:
[...]
> All of this code works fine the first time through. The problem is
> the next time through. The user is prompted for the password a
> subsequent time and when it comes through the key and password are
> updated. So far so good. However, the orb was not completely
> initialized the first time and the second pass encounters an
> ASSERTION in the omni_giopStreamInitializer.attach() function because
> it was previously called during the ORB_init but during the previous
> pass and thrown exception, it didn't clean anything out when it
> happened, leaving memory still in place.
It is a bug that the failed ORB_init leaves it in a broken state. I'm
surprised that has not come up before. It should be easy enough to fix
it -- I'll look into it.
However, for what you are trying to do, I think there is a better way
to handle it anyway, because catching the INITIALIZE exception, you
can't be certain that the cause of it was an incorrect password. What I
suggest you do is make a subclass of the sslContext class, and override
the set_privatekey method. It is designed to be overridden that way.
In your overridden method, you can prompt the user for the password,
and then if it is wrong, you will get the direct error from OpenSSL so
you can be certain that the password is the problem.
Look in include/omniORB4/sslContext.h for the class definition and in
src/lib/omniORB/orbcore/ssl/sslContext.cc for the implementation that
you should override.
Regards,
Duncan.
--
-- Duncan Grisby
-- duncan at grisby.org
-- https://www.grisby.org/
More information about the omniORB-list
mailing list