I like to do a gateway pattern on these types of things, especially in python to keep the indentation from getting too deep.
if not ssl_dict:
    return {}
<the rest of the function here>