SSH certificate import functions. More...
#include "ssh_types.h"
#include "ssh_cert_parse.h"
#include "pkc/rsa.h"
#include "pkc/dsa.h"
#include "ecc/ec.h"
#include "ecc/eddsa.h"
Go to the source code of this file.
Functions | |
error_t | sshImportCertificate (const char_t *input, size_t inputLen, uint8_t *output, size_t *outputLen) |
Import SSH certificate (OpenSSH format) More... | |
error_t | sshImportRsaCertPublicKey (const SshCertificate *cert, RsaPublicKey *publicKey) |
Import an RSA public key from a certificate. More... | |
error_t | sshImportDsaCertPublicKey (const SshCertificate *cert, DsaPublicKey *publicKey) |
Import a DSA public key from a certificate. More... | |
error_t | sshImportEcdsaCertPublicKey (const SshCertificate *cert, EcDomainParameters *params, EcPublicKey *publicKey) |
Import an ECDSA public key from a certificate. More... | |
error_t | sshImportEd25519CertPublicKey (const SshCertificate *cert, EddsaPublicKey *publicKey) |
Import an Ed25519 public key from a certificate. More... | |
const char_t * | sshGetCertType (const char_t *input, size_t length) |
Get SSH certificate type. More... | |
Detailed Description
SSH certificate import functions.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2019-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneSSH 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 ssh_cert_import.h.
Function Documentation
◆ sshGetCertType()
Get SSH certificate type.
- Parameters
-
[in] input SSH certificate file [in] length Length of the SSH certificate file
- Returns
- SSH certificate type
Definition at line 348 of file ssh_cert_import.c.
◆ sshImportCertificate()
error_t sshImportCertificate | ( | const char_t * | input, |
size_t | inputLen, | ||
uint8_t * | output, | ||
size_t * | outputLen | ||
) |
Import SSH certificate (OpenSSH format)
- Parameters
-
[in] input SSH certificate file to decode [in] inputLen Length of the SSH certificate file to decode [out] output Pointer to the decoded data (optional parameter) [out] outputLen Length of the decoded data
- Returns
- Error code
Definition at line 85 of file ssh_cert_import.c.
◆ sshImportDsaCertPublicKey()
error_t sshImportDsaCertPublicKey | ( | const SshCertificate * | cert, |
DsaPublicKey * | publicKey | ||
) |
Import a DSA public key from a certificate.
- Parameters
-
[in] cert Pointer to the certificate structure [out] publicKey Pointer to the DSA public key
- Returns
- Error code
Definition at line 191 of file ssh_cert_import.c.
◆ sshImportEcdsaCertPublicKey()
error_t sshImportEcdsaCertPublicKey | ( | const SshCertificate * | cert, |
EcDomainParameters * | params, | ||
EcPublicKey * | publicKey | ||
) |
Import an ECDSA public key from a certificate.
- Parameters
-
[in] cert Pointer to the certificate structure [out] params EC domain parameters [out] publicKey Pointer to the ECDSA public key
- Returns
- Error code
Definition at line 254 of file ssh_cert_import.c.
◆ sshImportEd25519CertPublicKey()
error_t sshImportEd25519CertPublicKey | ( | const SshCertificate * | cert, |
EddsaPublicKey * | publicKey | ||
) |
Import an Ed25519 public key from a certificate.
- Parameters
-
[in] cert Pointer to the certificate structure [out] publicKey Pointer to the RSA public key
- Returns
- Error code
Definition at line 313 of file ssh_cert_import.c.
◆ sshImportRsaCertPublicKey()
error_t sshImportRsaCertPublicKey | ( | const SshCertificate * | cert, |
RsaPublicKey * | publicKey | ||
) |
Import an RSA public key from a certificate.
- Parameters
-
[in] cert Pointer to the certificate structure [out] publicKey Pointer to the RSA public key
- Returns
- Error code
Definition at line 143 of file ssh_cert_import.c.