Improve openssl locks