Parsing of ASN.1 encoded keys. More...
Go to the source code of this file.
Functions | |
error_t | x509ParseSubjectPublicKeyInfo (const uint8_t *data, size_t length, size_t *totalLength, X509SubjectPublicKeyInfo *subjectPublicKeyInfo) |
Parse SubjectPublicKeyInfo structure. More... | |
error_t | x509ParseAlgoId (const uint8_t *data, size_t length, size_t *totalLength, X509SubjectPublicKeyInfo *subjectPublicKeyInfo) |
Parse AlgorithmIdentifier structure. More... | |
error_t | x509ParseRsaPublicKey (const uint8_t *data, size_t length, X509RsaPublicKey *rsaPublicKey) |
Parse RSAPublicKey structure. More... | |
error_t | x509ParseDsaPublicKey (const uint8_t *data, size_t length, X509DsaPublicKey *dsaPublicKey) |
Parse DSAPublicKey structure. More... | |
error_t | x509ParseDsaParameters (const uint8_t *data, size_t length, X509DsaParameters *dsaParams) |
Parse DSA domain parameters. More... | |
error_t | x509ParseEcPublicKey (const uint8_t *data, size_t length, X509EcPublicKey *ecPublicKey) |
Parse ECPublicKey structure. More... | |
error_t | x509ParseEcParameters (const uint8_t *data, size_t length, X509EcParameters *ecParams) |
Parse ECParameters structure. More... | |
error_t | x509ImportRsaPublicKey (const X509SubjectPublicKeyInfo *publicKeyInfo, RsaPublicKey *publicKey) |
Import an RSA public key. More... | |
error_t | x509ImportDsaPublicKey (const X509SubjectPublicKeyInfo *publicKeyInfo, DsaPublicKey *publicKey) |
Import a DSA public key. More... | |
error_t | x509ImportEcPublicKey (const X509SubjectPublicKeyInfo *publicKeyInfo, EcPublicKey *publicKey) |
Import an EC public key. More... | |
error_t | x509ImportEcParameters (const X509EcParameters *ecParams, EcDomainParameters *params) |
Import EC domain parameters. More... | |
error_t | x509ImportEddsaPublicKey (const X509SubjectPublicKeyInfo *publicKeyInfo, EddsaPublicKey *publicKey) |
Import an EdDSA public key. More... | |
Detailed Description
Parsing of ASN.1 encoded keys.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 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.4.4
Definition in file x509_key_parse.h.
Function Documentation
◆ x509ImportDsaPublicKey()
error_t x509ImportDsaPublicKey | ( | const X509SubjectPublicKeyInfo * | publicKeyInfo, |
DsaPublicKey * | publicKey | ||
) |
Import a DSA public key.
- Parameters
-
[in] publicKeyInfo Public key information [out] publicKey DSA public key
- Returns
- Error code
Definition at line 633 of file x509_key_parse.c.
◆ x509ImportEcParameters()
error_t x509ImportEcParameters | ( | const X509EcParameters * | ecParams, |
EcDomainParameters * | params | ||
) |
Import EC domain parameters.
- Parameters
-
[in] ecParams Pointer to the ECParameters structure [out] params EC domain parameters
- Returns
- Error code
Definition at line 802 of file x509_key_parse.c.
◆ x509ImportEcPublicKey()
error_t x509ImportEcPublicKey | ( | const X509SubjectPublicKeyInfo * | publicKeyInfo, |
EcPublicKey * | publicKey | ||
) |
Import an EC public key.
- Parameters
-
[in] publicKeyInfo Public key information [out] publicKey EC public key
- Returns
- Error code
Definition at line 718 of file x509_key_parse.c.
◆ x509ImportEddsaPublicKey()
error_t x509ImportEddsaPublicKey | ( | const X509SubjectPublicKeyInfo * | publicKeyInfo, |
EddsaPublicKey * | publicKey | ||
) |
Import an EdDSA public key.
- Parameters
-
[in] publicKeyInfo Public key information [out] publicKey EdDSA public key
- Returns
- Error code
Definition at line 839 of file x509_key_parse.c.
◆ x509ImportRsaPublicKey()
error_t x509ImportRsaPublicKey | ( | const X509SubjectPublicKeyInfo * | publicKeyInfo, |
RsaPublicKey * | publicKey | ||
) |
Import an RSA public key.
- Parameters
-
[in] publicKeyInfo Public key information [out] publicKey RSA public key
- Returns
- Error code
Definition at line 563 of file x509_key_parse.c.
◆ x509ParseAlgoId()
error_t x509ParseAlgoId | ( | const uint8_t * | data, |
size_t | length, | ||
size_t * | totalLength, | ||
X509SubjectPublicKeyInfo * | publicKeyInfo | ||
) |
Parse AlgorithmIdentifier structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] publicKeyInfo Information resulting from the parsing process
- Returns
- Error code
Definition at line 197 of file x509_key_parse.c.
◆ x509ParseDsaParameters()
error_t x509ParseDsaParameters | ( | const uint8_t * | data, |
size_t | length, | ||
X509DsaParameters * | dsaParams | ||
) |
Parse DSA domain parameters.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] dsaParams Information resulting from the parsing process
- Returns
- Error code
Definition at line 415 of file x509_key_parse.c.
◆ x509ParseDsaPublicKey()
error_t x509ParseDsaPublicKey | ( | const uint8_t * | data, |
size_t | length, | ||
X509DsaPublicKey * | dsaPublicKey | ||
) |
Parse DSAPublicKey structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] dsaPublicKey Information resulting from the parsing process
- Returns
- Error code
Definition at line 377 of file x509_key_parse.c.
◆ x509ParseEcParameters()
error_t x509ParseEcParameters | ( | const uint8_t * | data, |
size_t | length, | ||
X509EcParameters * | ecParams | ||
) |
Parse ECParameters structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] ecParams Information resulting from the parsing process
- Returns
- Error code
Definition at line 530 of file x509_key_parse.c.
◆ x509ParseEcPublicKey()
error_t x509ParseEcPublicKey | ( | const uint8_t * | data, |
size_t | length, | ||
X509EcPublicKey * | ecPublicKey | ||
) |
Parse ECPublicKey structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] ecPublicKey Information resulting from the parsing process
- Returns
- Error code
Definition at line 503 of file x509_key_parse.c.
◆ x509ParseRsaPublicKey()
error_t x509ParseRsaPublicKey | ( | const uint8_t * | data, |
size_t | length, | ||
X509RsaPublicKey * | rsaPublicKey | ||
) |
Parse RSAPublicKey structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] rsaPublicKey Information resulting from the parsing process
- Returns
- Error code
Definition at line 309 of file x509_key_parse.c.
◆ x509ParseSubjectPublicKeyInfo()
error_t x509ParseSubjectPublicKeyInfo | ( | const uint8_t * | data, |
size_t | length, | ||
size_t * | totalLength, | ||
X509SubjectPublicKeyInfo * | publicKeyInfo | ||
) |
Parse SubjectPublicKeyInfo structure.
- Parameters
-
[in] data Pointer to the ASN.1 structure to parse [in] length Length of the ASN.1 structure [out] totalLength Number of bytes that have been parsed [out] publicKeyInfo Information resulting from the parsing process
- Returns
- Error code
Definition at line 56 of file x509_key_parse.c.