pem_cert_key_import.c File Reference

PEM certificate public key import functions. More...

Go to the source code of this file.

Macros

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL
 

Functions

error_t pemImportRsaCertPublicKey (RsaPublicKey *publicKey, const char_t *input, size_t length)
 Extract the RSA public key from a PEM certificate. More...
 
error_t pemImportDsaCertPublicKey (DsaPublicKey *publicKey, const char_t *input, size_t length)
 Extract the DSA public key from a PEM certificate. More...
 
error_t pemImportEcCertPublicKey (EcPublicKey *publicKey, const char_t *input, size_t length)
 Extract the EC public key from a PEM certificate. More...
 
error_t pemImportEddsaCertPublicKey (EddsaPublicKey *publicKey, const char_t *input, size_t length)
 Extract the EdDSA public key from a PEM certificate. More...
 
X509KeyType pemGetCertPublicKeyType (const char_t *input, size_t length)
 Extract the type of the public key contained in a PEM certificate. More...
 

Detailed Description

PEM certificate public key 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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.5.0

Definition in file pem_cert_key_import.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL

Definition at line 32 of file pem_cert_key_import.c.

Function Documentation

◆ pemGetCertPublicKeyType()

X509KeyType pemGetCertPublicKeyType ( const char_t input,
size_t  length 
)

Extract the type of the public key contained in a PEM certificate.

Parameters
[in]inputPointer to the PEM certificate
[in]lengthLength of the PEM certificate
Returns
Public key type

Definition at line 392 of file pem_cert_key_import.c.

◆ pemImportDsaCertPublicKey()

error_t pemImportDsaCertPublicKey ( DsaPublicKey publicKey,
const char_t input,
size_t  length 
)

Extract the DSA public key from a PEM certificate.

Parameters
[out]publicKeyDSA public key resulting from the parsing process
[in]inputPointer to the PEM certificate
[in]lengthLength of the PEM certificate
Returns
Error code

Definition at line 141 of file pem_cert_key_import.c.

◆ pemImportEcCertPublicKey()

error_t pemImportEcCertPublicKey ( EcPublicKey publicKey,
const char_t input,
size_t  length 
)

Extract the EC public key from a PEM certificate.

Parameters
[out]publicKeyEC public key resulting from the parsing process
[in]inputPointer to the PEM certificate
[in]lengthLength of the PEM certificate
Returns
Error code

Definition at line 225 of file pem_cert_key_import.c.

◆ pemImportEddsaCertPublicKey()

error_t pemImportEddsaCertPublicKey ( EddsaPublicKey publicKey,
const char_t input,
size_t  length 
)

Extract the EdDSA public key from a PEM certificate.

Parameters
[out]publicKeyEdDSA public key resulting from the parsing process
[in]inputPointer to the PEM certificate
[in]lengthLength of the PEM certificate
Returns
Error code

Definition at line 309 of file pem_cert_key_import.c.

◆ pemImportRsaCertPublicKey()

error_t pemImportRsaCertPublicKey ( RsaPublicKey publicKey,
const char_t input,
size_t  length 
)

Extract the RSA public key from a PEM certificate.

Parameters
[out]publicKeyRSA public key resulting from the parsing process
[in]inputPointer to the PEM certificate
[in]lengthLength of the PEM certificate
Returns
Error code

Definition at line 57 of file pem_cert_key_import.c.