IoT managed integrations End Device SDK
Loading...
Searching...
No Matches
iotmi_pal_Pkcs11Operations.h
Go to the documentation of this file.
1/*
2 * AWS IoT Device SDK for Embedded C 202211.00
3 * Copyright (C) 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 */
23
29#ifndef IOTMI_PAL_PKCS11_OPERATIONS_H_
30#define IOTMI_PAL_PKCS11_OPERATIONS_H_
31
32/* Standard includes. */
33#include <stdbool.h>
34#include <stdlib.h>
35
36/* corePKCS11 include. */
37#include "core_pkcs11.h"
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
53bool iotmiPal_pkcs11LoadCertificate(CK_SESSION_HANDLE p11Session,
54 const char* pCertificate,
55 const char* pLabel,
56 size_t certificateLength);
57
68bool iotmiPal_pkcs11LoadPrivateKey(CK_SESSION_HANDLE p11Session,
69 const char* pPrivateKey, const char* pLabel,
70 size_t privateKeyLength);
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif /* ifndef IOTMI_PAL_PKCS11_OPERATIONS_H_ */
bool iotmiPal_pkcs11LoadCertificate(CK_SESSION_HANDLE p11Session, const char *pCertificate, const char *pLabel, size_t certificateLength)
Save the device client certificate into the PKCS #11 module.
bool iotmiPal_pkcs11LoadPrivateKey(CK_SESSION_HANDLE p11Session, const char *pPrivateKey, const char *pLabel, size_t privateKeyLength)
Save the device client certificate into the PKCS #11 module.