S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_key_manager.h
Go to the documentation of this file.
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
30#ifndef SOPC_KEY_MANAGER_H_
31#define SOPC_KEY_MANAGER_H_
32
33#include "sopc_crypto_decl.h"
34
35// Must be included last
37
38/* ------------------------------------------------------------------------------------------------
39 * AsymmetricKey API
40 * ------------------------------------------------------------------------------------------------
41 */
42
53 uint32_t len,
55
68
85 char* password,
86 uint32_t lenPassword);
87
98 bool is_public,
100
111 bool is_public,
112 SOPC_AsymmetricKey** res);
113
120
121/* ------------------------------------------------------------------------------------------------
122 * Cert API
123 * ------------------------------------------------------------------------------------------------
124 */
125
136 uint32_t len,
138
149
156
167
177
187
188#endif /* SOPC_KEY_MANAGER_H_ */
Defines the common declarations for the cryptographic objects. The structures and macros defined in t...
SOPC_SecretBuffer SOPC_SerializedAsymmetricKey
A serialized representation of an asymmetric key.
Definition sopc_crypto_decl.h:70
enum _SOPC_ReturnStatus SOPC_ReturnStatus
Common enumerations for S2OPC.
SOPC_ReturnStatus SOPC_KeyManager_SerializedAsymmetricKey_Deserialize(const SOPC_SerializedAsymmetricKey *key, bool is_public, SOPC_AsymmetricKey **res)
Deserializes a serialized key.
const SOPC_Buffer * SOPC_KeyManager_SerializedCRL_Data(const SOPC_SerializedCRL *crl)
Returns the data held in a serialized CRL.
SOPC_ReturnStatus SOPC_KeyManager_SerializedAsymmetricKey_CreateFromKey(const SOPC_AsymmetricKey *pKey, bool is_public, SOPC_SerializedAsymmetricKey **out)
Creates a serialized asymmetric key from an SOPC_AsymmetricKey structure.
SOPC_ReturnStatus SOPC_KeyManager_SerializedAsymmetricKey_CreateFromFile(const char *path, SOPC_SerializedAsymmetricKey **key)
Creates a serialized asymmetric key from a file in DER or PEM format.
SOPC_ReturnStatus SOPC_KeyManager_SerializedCertificate_CreateFromDER(const uint8_t *der, uint32_t len, SOPC_SerializedCertificate **cert)
Creates a serialized certificate from a DER payload.
void SOPC_KeyManager_SerializedCertificate_Delete(SOPC_SerializedCertificate *cert)
Releases all resources associated to a serialized certificate.
SOPC_ReturnStatus SOPC_KeyManager_SerializedCertificate_Deserialize(const SOPC_SerializedCertificate *cert, SOPC_CertificateList **res)
Deserializes a serialized certificate.
const SOPC_Buffer * SOPC_KeyManager_SerializedCertificate_Data(const SOPC_SerializedCertificate *cert)
Returns the data held in a serialized certificate.
SOPC_ReturnStatus SOPC_KeyManager_SerializedAsymmetricKey_CreateFromFile_WithPwd(const char *keyPath, SOPC_SerializedAsymmetricKey **key, char *password, uint32_t lenPassword)
Creates a serialized asymmetric key from a file in DER or PEM format with an optional password for th...
SOPC_ReturnStatus SOPC_KeyManager_SerializedAsymmetricKey_CreateFromData(const uint8_t *data, uint32_t len, SOPC_SerializedAsymmetricKey **key)
Creates a serialized asymmetric key from a DER or PEM payload.
SOPC_ReturnStatus SOPC_KeyManager_SerializedCertificate_CreateFromFile(const char *path, SOPC_SerializedCertificate **cert)
Creates a serialized certificate from a file in DER or PEM format.
void SOPC_KeyManager_SerializedAsymmetricKey_Delete(SOPC_SerializedAsymmetricKey *key)
Releases all resources associated to a serialized asymmetric key.
Defines the cryptographic abstraction interface for Asymmetric Key Management such as loading signed ...
The asymmetric key representation.
Definition key_manager_cyclone.h:42
Bytes buffer structure.
Definition sopc_buffer.h:38
The signed public key representation.
Definition key_manager_cyclone.h:60