def is_fips_mode():
    """
    Verify that ssl.FIPS_mode() returns 1 and that using md5 raises an
    exception
    """
    import hashlib
    import ssl
    if not hasattr(ssl, 'FIPS_mode'):
        return False
    elif ssl.FIPS_mode() != 1:
        return False
    try:
        digest = hashlib.md5(b'Hello World\n').hexdigest()
        return False
    except ValueError:
        pass
    return True
