blob: fb9541ba9c7ae46223db770c988ceec8eee3f740 [file] [log] [blame]
Adrien BĂ©raud612b55b2023-05-29 10:42:04 -04001/*
2 * Copyright (C) 2004-2023 Savoir-faire Linux Inc.
3 *
4 * Author: Philippe Proulx <philippe.proulx@savoirfairelinux.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20#pragma once
21
22namespace libjami {
23
24namespace Certificate {
25
26namespace Status {
27constexpr static char UNDEFINED[] = "UNDEFINED";
28constexpr static char ALLOWED[] = "ALLOWED";
29constexpr static char BANNED[] = "BANNED";
30} // namespace Status
31
32namespace TrustStatus {
33constexpr static char UNTRUSTED[] = "UNTRUSTED";
34constexpr static char TRUSTED[] = "TRUSTED";
35} // namespace TrustStatus
36
37/**
38 * Those constantes are used by the ConfigurationManager.validateCertificate method
39 */
40namespace ChecksNames {
41constexpr static char HAS_PRIVATE_KEY[] = "HAS_PRIVATE_KEY";
42constexpr static char EXPIRED[] = "EXPIRED";
43constexpr static char STRONG_SIGNING[] = "STRONG_SIGNING";
44constexpr static char NOT_SELF_SIGNED[] = "NOT_SELF_SIGNED";
45constexpr static char KEY_MATCH[] = "KEY_MATCH";
46constexpr static char PRIVATE_KEY_STORAGE_PERMISSION[] = "PRIVATE_KEY_STORAGE_PERMISSION";
47constexpr static char PUBLIC_KEY_STORAGE_PERMISSION[] = "PUBLIC_KEY_STORAGE_PERMISSION";
48constexpr static char PRIVATE_KEY_DIRECTORY_PERMISSIONS[] = "PRIVATEKEY_DIRECTORY_PERMISSIONS";
49constexpr static char PUBLIC_KEY_DIRECTORY_PERMISSIONS[] = "PUBLICKEY_DIRECTORY_PERMISSIONS";
50constexpr static char PRIVATE_KEY_STORAGE_LOCATION[] = "PRIVATE_KEY_STORAGE_LOCATION";
51constexpr static char PUBLIC_KEY_STORAGE_LOCATION[] = "PUBLIC_KEY_STORAGE_LOCATION";
52constexpr static char PRIVATE_KEY_SELINUX_ATTRIBUTES[] = "PRIVATE_KEY_SELINUX_ATTRIBUTES";
53constexpr static char PUBLIC_KEY_SELINUX_ATTRIBUTES[] = "PUBLIC_KEY_SELINUX_ATTRIBUTES";
54constexpr static char EXIST[] = "EXIST";
55constexpr static char VALID[] = "VALID";
56constexpr static char VALID_AUTHORITY[] = "VALID_AUTHORITY";
57constexpr static char KNOWN_AUTHORITY[] = "KNOWN_AUTHORITY";
58constexpr static char NOT_REVOKED[] = "NOT_REVOKED";
59constexpr static char AUTHORITY_MISMATCH[] = "AUTHORITY_MISMATCH";
60constexpr static char UNEXPECTED_OWNER[] = "UNEXPECTED_OWNER";
61constexpr static char NOT_ACTIVATED[] = "NOT_ACTIVATED";
62} // namespace ChecksNames
63
64/**
65 * Those constants are used by the ConfigurationManager.getCertificateDetails method
66 */
67namespace DetailsNames {
68constexpr static char EXPIRATION_DATE[] = "EXPIRATION_DATE";
69constexpr static char ACTIVATION_DATE[] = "ACTIVATION_DATE";
70constexpr static char REQUIRE_PRIVATE_KEY_PASSWORD[] = "REQUIRE_PRIVATE_KEY_PASSWORD";
71constexpr static char PUBLIC_SIGNATURE[] = "PUBLIC_SIGNATURE";
72constexpr static char VERSION_NUMBER[] = "VERSION_NUMBER";
73constexpr static char SERIAL_NUMBER[] = "SERIAL_NUMBER";
74constexpr static char ISSUER[] = "ISSUER";
75constexpr static char SUBJECT_KEY_ALGORITHM[] = "SUBJECT_KEY_ALGORITHM";
76constexpr static char CN[] = "CN";
77constexpr static char N[] = "N";
78constexpr static char O[] = "O";
79constexpr static char SIGNATURE_ALGORITHM[] = "SIGNATURE_ALGORITHM";
80constexpr static char MD5_FINGERPRINT[] = "MD5_FINGERPRINT";
81constexpr static char SHA1_FINGERPRINT[] = "SHA1_FINGERPRINT";
82constexpr static char PUBLIC_KEY_ID[] = "PUBLIC_KEY_ID";
83constexpr static char ISSUER_DN[] = "ISSUER_DN";
84constexpr static char NEXT_EXPECTED_UPDATE_DATE[] = "NEXT_EXPECTED_UPDATE_DATE";
85constexpr static char OUTGOING_SERVER[] = "OUTGOING_SERVER";
86constexpr static char IS_CA[] = "IS_CA";
87} // namespace DetailsNames
88
89/**
90 * Those constants are used by the ConfigurationManager.getCertificateDetails and
91 * ConfigurationManager.validateCertificate methods
92 */
93namespace ChecksValuesTypesNames {
94constexpr static char BOOLEAN[] = "BOOLEAN";
95constexpr static char ISO_DATE[] = "ISO_DATE";
96constexpr static char CUSTOM[] = "CUSTOM";
97constexpr static char NUMBER[] = "NUMBER";
98} // namespace ChecksValuesTypesNames
99
100/**
101 * Those constantes are used by the ConfigurationManager.validateCertificate method
102 */
103namespace CheckValuesNames {
104constexpr static char PASSED[] = "PASSED";
105constexpr static char FAILED[] = "FAILED";
106constexpr static char UNSUPPORTED[] = "UNSUPPORTED";
107constexpr static char ISO_DATE[] = "ISO_DATE";
108constexpr static char CUSTOM[] = "CUSTOM";
109constexpr static char DATE[] = "DATE";
110} // namespace CheckValuesNames
111
112} // namespace Certificate
113
114namespace TlsTransport {
115constexpr static char TLS_PEER_CERT[] = "TLS_PEER_CERT";
116constexpr static char TLS_PEER_CA_NUM[] = "TLS_PEER_CA_NUM";
117constexpr static char TLS_PEER_CA_[] = "TLS_PEER_CA_";
118constexpr static char TLS_CIPHER[] = "TLS_CIPHER";
119} // namespace TlsTransport
120
121} // namespace libjami