upgraded openssl func style