def get_peer_name(cert):
    """Extract the client name from an SSL certificate

    Parameters:
        cert (dict): SSL certificate

    Returns:
        str: Client name

    """

    subject = cert['subject']
    for x in subject:
        if x[0][0] == 'commonName':
            return x[0][1]