PEM file import functions. More...
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Functions | |
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. More... | |
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. More... | |
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. More... | |
error_t | pemImportDhParameters (DhParameters *params, const char_t *input, size_t length) |
Decode a PEM file containing Diffie-Hellman parameters. More... | |
Detailed Description
PEM file import functions.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.5.2
Definition in file pem_import.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Definition at line 32 of file pem_import.c.
Function Documentation
◆ pemImportCertificate()
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.
- Parameters
-
[in] input Pointer to the PEM string [in] inputLen Length of the PEM string [out] output Pointer to the DER-encoded certificate [out] outputLen Length of the DER-encoded certificate, in bytes [out] consumed Total number of characters that have been consumed (optional parameter)
- Returns
- Error code
Definition at line 55 of file pem_import.c.
◆ pemImportCrl()
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.
- Parameters
-
[in] input Pointer to the PEM string [in] inputLen Length of the PEM string [out] output Pointer to the DER-encoded CRL [out] outputLen Length of the DER-encoded CRL, in bytes [out] consumed Total number of characters that have been consumed (optional parameter)
- Returns
- Error code
Definition at line 84 of file pem_import.c.
◆ pemImportCsr()
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.
- Parameters
-
[in] input Pointer to the PEM string [in] inputLen Length of the PEM string [out] output Pointer to the DER-encoded CSR [out] outputLen Length of the DER-encoded CSR, in bytes
- Returns
- Error code
Definition at line 111 of file pem_import.c.
◆ pemImportDhParameters()
error_t pemImportDhParameters | ( | DhParameters * | params, |
const char_t * | input, | ||
size_t | length | ||
) |
Decode a PEM file containing Diffie-Hellman parameters.
- Parameters
-
[out] params Diffie-Hellman parameters resulting from the parsing process [in] input Pointer to the PEM string [in] length Length of the PEM string
- Returns
- Error code
Definition at line 137 of file pem_import.c.