hex_str should be free'd with `OPENSSL_free`