As discribed in here, the index integer returned from X509_STORE_get_ex_new_index() is unique within structures for the lifetime of the program. So, instead of acquire index integer for each openssl negotiation, it would be better to acquire an index integer during the initializing of tls_wrappers/openssl library. And in this case we can remove per_thread.c.
As discribed in here, the index integer returned from X509_STORE_get_ex_new_index() is unique within structures for the lifetime of the program. So, instead of acquire index integer for each openssl negotiation, it would be better to acquire an index integer during the initializing of tls_wrappers/openssl library. And in this case we can remove per_thread.c.
More information: per_thread.c was firstly introduced in this commit: https://github.com/inclavare-containers/enclave-tls/commit/a9ed47bf72722a3c463f3e2351bbc3371cc6cef5