Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Secure Communication Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

5.10 Handling Errors from the Cryptographic Library

OpenSSL uses a stack to report errors. When an error occurs in either cryptographic library, one or more errors are pushed onto the stack. If these errors are not cleared from the stack, they can cause subsequent calls to the cryptographic library to fail. For example, if your application calls SSL_CTX_load_verify_locations() with an invalid path and then again with a valid path, the second call fails because the error stack was not cleared. The Secure Sockets package handles this problem by clearing the error stack after the package throws an exception.


If your application mixes Secure Sockets package calls with cryptographic library calls and it checks the stack after calling a low-level function in the cryptographic library, you might not want the stack to be cleared. In that case, you can define the macro RW_SECSOCK_PRESERVE_ERROR_STACK using RCB. This macro causes the compiler to ignore lines in the code that clear the error stack while handling exceptions.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.