def info(ctx, check_fips):
    """
    Show general information.

    Displays information about the attached YubiKey such as serial number,
    firmware version, applications, etc.
    """
    dev = ctx.obj['dev']

    if dev.is_fips and check_fips:
        fips_status = get_overall_fips_status(dev.serial, dev.config)

    click.echo('Device type: {}'.format(dev.device_name))
    click.echo('Serial number: {}'.format(
        dev.serial or 'Not set or unreadable'))
    if dev.version:
        f_version = '.'.join(str(x) for x in dev.version)
        click.echo('Firmware version: {}'.format(f_version))
    else:
        click.echo('Firmware version: Uncertain, re-run with only one '
                   'YubiKey connected')

    config = dev.config
    if config.form_factor:
        click.echo('Form factor: {!s}'.format(config.form_factor))
    click.echo('Enabled USB interfaces: {}'.format(dev.mode))
    if config.nfc_supported:
        f_nfc = 'enabled' if config.nfc_enabled else 'disabled'
        click.echo('NFC interface is {}.'.format(f_nfc))
    if config.configuration_locked:
        click.echo('Configured applications are protected by a lock code.')
    click.echo()

    print_app_status_table(config)

    if dev.is_fips and check_fips:
        click.echo()

        click.echo('FIPS Approved Mode: {}'.format(
            'Yes' if all(fips_status.values()) else 'No'))

        status_keys = list(fips_status.keys())
        status_keys.sort()
        for status_key in status_keys:
            click.echo('  {}: {}'.format(
                status_key, 'Yes' if fips_status[status_key] else 'No'))
Show general information.

    Displays information about the attached YubiKey such as serial number,
    firmware version, applications, etc.