New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GSEC hiding error - CryptAcquireContext [CORE1057] #1478
Comments
Commented by: @AlexPeshkoff It was pretty easy to fix this error in HEAD. Unfortunately, there is no special LongJump class in 2.0. And I want to ask for other peolple opinions - what is better: backport this class to 2.0 (good backport requies multiple changes in the tree) or create gsec specific flag, notifying that gsec_exit() was called? |
Commented by: @dyemanov What about catching Firebird::status_exception and checking for *ex.value() to distingiush between "long jump" usage and a status-based one? |
Commented by: @AlexPeshkoff Currently gsec_exit() in 2.0 throws std::exception(). And knows absolutely nothing about Firebird::status_exception. The dark side here is that when good status_vector, received in an old manner, is passed to stuff_exception(), vector's content may be destroyed in it. In head it's fixed with empty virtual LongJump::stuff_exception() and missing empty raise But in 2.0 loosing status_vector is quite possible - we do not test for empty status_exception before changing first element of status_vector. Should it be fixed too? |
Commented by: @dyemanov Consider calling Firebird::status_exception::raise() in gsec_exit() -- as we do in alice.cpp -- and then catchig the exception like this:
I don't see how it could lose status vector data. |
Commented by: @AlexPeshkoff In this way it can loose non-Firebird exceptions, like std::bad_alloc. But appears there is a way to catch it too, using stuff_exception. |
Commented by: @AlexPeshkoff A bit ugly, but now it works in any case. |
Modified by: @AlexPeshkoffstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.0.1 [ 10090 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pcisarWorkflow: jira [ 11402 ] => Firebird [ 14238 ] |
Modified by: @pavel-zotovQA Status: No test |
Submitted by: @AlexPeshkoff
By some unknown reason for me, in guid.cpp the call to
CryptAcquireContext(..., CRYPT_NEWKEYSET) generates a error, in a WinXP
environment.
The error is hidden, I see nothing from gsec console, that's the bug.
Commits: 73e1f97 513b6a5
The text was updated successfully, but these errors were encountered: