Feature/openssl exceptions

Better OpenSSL exceptions handling