@staticmethod
def _sanityCheckExtensions(other):
    """Check if set extension settings are sane"""
    if other.useEncryptThenMAC not in (True, False):
        raise ValueError('useEncryptThenMAC can only be True or False')
    if other.useExtendedMasterSecret not in (True, False):
        raise ValueError('useExtendedMasterSecret must be True or False')
    if other.requireExtendedMasterSecret not in (True, False):
        raise ValueError('requireExtendedMasterSecret must be True or False')
    if other.requireExtendedMasterSecret and not other.useExtendedMasterSecret:
        raise ValueError(
            'requireExtendedMasterSecret requires useExtendedMasterSecret')
    if other.usePaddingExtension not in (True, False):
        raise ValueError('usePaddingExtension must be True or False')
