1#
2# This file is part of pyasn1-modules software.
3#
4# Created by Russ Housley with assistance from asn1ate v.0.6.0.
5#
6# Copyright (c) 2019, Vigil Security, LLC
7# License: http://snmplabs.com/pyasn1/license.html
8#
9# TEST Company Classification Policies
10#
11# ASN.1 source from:
12# https://www.rfc-editor.org/rfc/rfc3114.txt
13#
14
15from pyasn1.type import char
16from pyasn1.type import namedval
17from pyasn1.type import univ
18
19from pyasn1_modules import rfc5755
20
21
22id_smime = univ.ObjectIdentifier((1, 2, 840, 113549, 1, 9, 16, ))
23
24id_tsp = id_smime + (7, )
25
26id_tsp_TEST_Amoco = id_tsp + (1, )
27
28class Amoco_SecurityClassification(univ.Integer):
29    namedValues = namedval.NamedValues(
30        ('amoco-general', 6),
31        ('amoco-confidential', 7),
32        ('amoco-highly-confidential', 8)
33    )
34
35
36id_tsp_TEST_Caterpillar = id_tsp + (2, )
37
38class Caterpillar_SecurityClassification(univ.Integer):
39    namedValues = namedval.NamedValues(
40        ('caterpillar-public', 6),
41        ('caterpillar-green', 7),
42        ('caterpillar-yellow', 8),
43        ('caterpillar-red', 9)
44    )
45
46
47id_tsp_TEST_Whirlpool = id_tsp + (3, )
48
49class Whirlpool_SecurityClassification(univ.Integer):
50    namedValues = namedval.NamedValues(
51        ('whirlpool-public', 6),
52        ('whirlpool-internal', 7),
53        ('whirlpool-confidential', 8)
54    )
55
56
57id_tsp_TEST_Whirlpool_Categories = id_tsp + (4, )
58
59class SecurityCategoryValues(univ.SequenceOf):
60    componentType = char.UTF8String()
61
62# Example SecurityCategoryValues: "LAW DEPARTMENT USE ONLY"
63# Example SecurityCategoryValues: "HUMAN RESOURCES USE ONLY"
64
65
66# Also, the privacy mark in the security label can contain a string,
67# such as: "ATTORNEY-CLIENT PRIVILEGED INFORMATION"
68
69
70# Map of security category type OIDs to security category added
71# to the ones that are in rfc5755.py
72
73_securityCategoryMapUpdate = {
74    id_tsp_TEST_Whirlpool_Categories: SecurityCategoryValues(),
75}
76
77rfc5755.securityCategoryMap.update(_securityCategoryMapUpdate)
78