Coverage Report

Created: 2025-08-03 06:13

/src/S2OPC/src/Common/crypto/sopc_key_sets.c
Line
Count
Source (jump to first uncovered line)
1
/*
2
 * Licensed to Systerel under one or more contributor license
3
 * agreements. See the NOTICE file distributed with this work
4
 * for additional information regarding copyright ownership.
5
 * Systerel licenses this file to you under the Apache
6
 * License, Version 2.0 (the "License"); you may not use this
7
 * file except in compliance with the License. You may obtain
8
 * a copy of the License at
9
 *
10
 *   http://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing,
13
 * software distributed under the License is distributed on an
14
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
 * KIND, either express or implied.  See the License for the
16
 * specific language governing permissions and limitations
17
 * under the License.
18
 */
19
20
#include <stddef.h>
21
22
#include "sopc_key_sets.h"
23
#include "sopc_mem_alloc.h"
24
25
SOPC_SC_SecurityKeySet* SOPC_KeySet_Create(void)
26
0
{
27
0
    SOPC_SC_SecurityKeySet* keySet = SOPC_Malloc(sizeof(SOPC_SC_SecurityKeySet));
28
0
    return keySet;
29
0
}
30
31
void SOPC_KeySet_Delete(SOPC_SC_SecurityKeySet* keySet)
32
0
{
33
0
    if (keySet != NULL)
34
0
    {
35
0
        SOPC_SecretBuffer_DeleteClear(keySet->encryptKey);
36
0
        SOPC_SecretBuffer_DeleteClear(keySet->initVector);
37
0
        SOPC_SecretBuffer_DeleteClear(keySet->signKey);
38
0
        SOPC_Free(keySet);
39
0
    }
40
0
}