PLUSNative error 9005 SK_ERROR_VERIFICATION_FAILED
Error SK_ERROR_VERIFICATION_FAILED (error code 9005) is likely returned due to the API context being disposed using the SK_FLAGS_APICONTEXTDISPOSE_SHUTDOWN flag, and another subsequent API context is being initialized.
The PLUSNative library uses the OpenSSL library for cryptography and starting with Protection PLUS 5 SDK release 220.127.116.11, OpenSSL was migrated from version 1.0.2 to version 1.1.1. This upgrade was absolutely necessary, as official support for 1.0.2 ended at the start of the year 2020. (Source: https://www.openssl.org/policies/releasestrat.html.)
With the prior version of OpenSSL 1.0.2, shutting down the API with the SK_FLAGS_APICONTEXTDISPOSE_SHUTDOWN flag might allow another context to be initialized and used, even though our documentation states the API should not be used after disposing the context with that flag since you might have unforeseen behavior.
"The SK_FLAGS_APICONTEXTDISPOSE_SHUTDOWN flag must be passed the last time your application calls this function. This should be the last PLUSNative API function your application calls, and it should also be done from your application's main thread (especially when using SK_FLAGS_APICONTEXTINITIALIZE_MAINTHREAD with SK_ApiContextInitialize). This will shutdown the PLUSNative API and will free all memory."
With versions of PLUSNative starting from 18.104.22.168, when disposing the context with the SK_FLAGS_APICONTEXTDISPOSE_SHUTDOWN, no other calls using our API should be made as OpenSSL will not initialize again after it was shutdown. Error SK_ERROR_VERIFICATION_FAILED is likely the decryption of the license data failing as OpenSSL could not be initialized a second time after it was shutdown.
Be sure SK_ApiContextDispose is called without the SK_FLAGS_APICONTEXTDISPOSE_SHUTDOWN flag until you no longer need the API. For example, a good place to call the final dispose is at application shutdown.