REFACTOR: search for openssl first and fix openssl wildcard matching