Line data Source code
1 : /* SPDX-FileCopyrightText: Copyright 2026 Cozens Software Solutions Limited
2 : * SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0 OR LicenseRef-PolyForm-Internal-Use-1.0.0 OR LicenseRef-COSOSO-Commercial
3 : */
4 :
5 : #ifndef SOLIDSYSLOGMBEDTLSAESGCMPOLICYPRIVATE_H
6 : #define SOLIDSYSLOGMBEDTLSAESGCMPOLICYPRIVATE_H
7 :
8 : #include <stdbool.h>
9 : #include <stdint.h>
10 :
11 : #include "SolidSyslogError.h"
12 : #include "SolidSyslogMbedTlsAesGcmPolicy.h"
13 : #include "SolidSyslogMbedTlsAesGcmPolicyErrors.h"
14 : #include "SolidSyslogPrival.h"
15 : #include "SolidSyslogSecurityPolicyDefinition.h"
16 :
17 : struct SolidSyslogMbedTlsAesGcmPolicy
18 : {
19 : struct SolidSyslogSecurityPolicy Base;
20 : struct SolidSyslogMbedTlsAesGcmPolicyConfig Config;
21 : bool FaultReported; /* A run of faults is reported once; a verdict re-arms it. */
22 : };
23 :
24 : void SolidSyslogMbedTlsAesGcmPolicy_Initialise(
25 : struct SolidSyslogSecurityPolicy* base,
26 : const struct SolidSyslogMbedTlsAesGcmPolicyConfig* config
27 : );
28 : void SolidSyslogMbedTlsAesGcmPolicy_Cleanup(struct SolidSyslogSecurityPolicy* base);
29 :
30 31 : static inline void MbedTlsAesGcmPolicy_Report(
31 : enum SolidSyslogSeverity severity,
32 : uint16_t category,
33 : enum SolidSyslogAesGcmPolicyErrors code
34 : )
35 : {
36 31 : SolidSyslog_Error(severity, &SolidSyslogMbedTlsAesGcmPolicyErrorSource, category, (int32_t) code);
37 31 : }
38 :
39 : #endif /* SOLIDSYSLOGMBEDTLSAESGCMPOLICYPRIVATE_H */
|