pem_import.h
Go to the documentation of this file.
1 /**
2  * @file pem_import.h
3  * @brief PEM file import functions
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneCRYPTO Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.5.2
29  **/
30 
31 #ifndef _PEM_IMPORT_H
32 #define _PEM_IMPORT_H
33 
34 //Dependencies
35 #include "core/crypto.h"
36 #include "pkix/pem_common.h"
37 #include "pkix/x509_common.h"
38 #include "pkc/dh.h"
39 
40 //C++ guard
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 //PEM related functions
46 error_t pemImportCertificate(const char_t *input, size_t inputLen,
47  uint8_t *output, size_t *outputLen, size_t *consumed);
48 
49 error_t pemImportCrl(const char_t *input, size_t inputLen,
50  uint8_t *output, size_t *outputLen, size_t *consumed);
51 
52 error_t pemImportCsr(const char_t *input, size_t inputLen,
53  uint8_t *output, size_t *outputLen);
54 
55 error_t pemImportDhParameters(DhParameters *params, const char_t *input,
56  size_t length);
57 
58 //C++ guard
59 #ifdef __cplusplus
60 }
61 #endif
62 
63 #endif
X.509 common definitions.
error_t pemImportCsr(const char_t *input, size_t inputLen, uint8_t *output, size_t *outputLen)
Decode a PEM file containing a certification signing request.
Definition: pem_import.c:111
PEM common definitions.
Diffie-Hellman key exchange.
error_t
Error codes.
Definition: error.h:43
General definitions for cryptographic algorithms.
error_t pemImportCrl(const char_t *input, size_t inputLen, uint8_t *output, size_t *outputLen, size_t *consumed)
Decode a PEM file containing a certificate revocation list.
Definition: pem_import.c:84
uint8_t length
Definition: tcp.h:375
error_t pemImportCertificate(const char_t *input, size_t inputLen, uint8_t *output, size_t *outputLen, size_t *consumed)
Decode a PEM file containing a certificate.
Definition: pem_import.c:55
char char_t
Definition: compiler_port.h:55
Diffie-Hellman parameters.
Definition: dh.h:49
error_t pemImportDhParameters(DhParameters *params, const char_t *input, size_t length)
Decode a PEM file containing Diffie-Hellman parameters.
Definition: pem_import.c:137