This file is indexed.

/usr/share/pyshared/pyhsm/version.py is in python-pyhsm 1.0.4f-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
"""
module for keeping track of different capabilities in different versions
"""

# Copyright (c) 2011 Yubico AB
# See the file COPYING for licence statement.

__all__ = [
    # constants
    # functions
    # classes
    'YHSM_Version'
]

class YHSM_Version():
    """ Keeps the YubiHSM's version number and can tell what capabilities it has.

    @ivar sysinfo: Sysinfo when YubiHSM was initialized.
    @type sysinfo: L{YHSM_Cmd_System_Info}
    """

    def __init__(self, sysinfo):
        """
        @param sysinfo: YubiHSM sysinfo.
        @type sysinfo: L{YHSM_Cmd_System_Info}
        """
        self.sysinfo = sysinfo
        self.ver = (sysinfo.version_major, sysinfo.version_minor, sysinfo.version_build,)

    def have_key_storage_unlock(self):
        """
        YSM_KEY_STORAGE_UNLOCK was removed in 1.0.

        The basic concept of a passphrase to unlock the YubiHSM is now provided
        with the more secure YSM_KEY_STORE_DECRYPT.
        """
        return self.ver < (1, 0,)

    def have_key_store_decrypt(self):
        """ YSM_KEY_STORE_DECRYPT was introduced in 1.0, replacing YSM_KEY_STORAGE_UNLOCK. """
        return self.ver >= (1, 0, 0)

    def have_unlock(self):
        """
        YSM_HSM_UNLOCK, featuring YubiKey OTP unlocking of operations,
        was introduced in 1.0.
        """
        return self.ver >= (1, 0, 0)

    def have_keycommit(self):
        """
        YubiHSM have the 'keycommit' command in configuration mode.

        'keycommit' was introduced in 1.0.
        """
        return self.ver >= (1, 0, 0)

    def have_keydisable(self):
        """
        YubiHSM have the 'keydis'(able) command in configuration mode.

        'keydis' was introduced in 1.0.
        """
        return self.ver >= (1, 0, 1)

    def have_YSM_BUFFER_LOAD(self):
        """
        This is a key handle permission flag that was introduced in 0.9.9.
        """
        return self.ver >= (0, 9, 9,)

    def have_YSM_DB_YUBIKEY_AEAD_STORE2(self):
        """
        The 2nd generation store command (with public id != nonce) was introduced in 1.0.4.
        """
        return self.ver >= (1, 0, 4)