ssh_cert_verify.h
Go to the documentation of this file.
1 /**
2  * @file ssh_cert_verify.h
3  * @brief SSH certificate verification
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2019-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneSSH 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.4.0
29  **/
30 
31 #ifndef _SSH_CERT_VERIFY_H
32 #define _SSH_CERT_VERIFY_H
33 
34 //Dependencies
35 #include "ssh.h"
36 #include "ssh_cert_import.h"
37 
38 //C++ guard
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 //SSH certificate verification related functions
45  const SshString *publicKeyAlgo, const SshBinaryString *hostKey,
46  bool_t flag);
47 
49  const SshString *publicKeyAlgo, const SshBinaryString *hostKey);
50 
53 
55  const SshCertificate *cert);
56 
58  const SshBinaryString *optionData);
59 
61  const SshCertificate *cert);
62 
63 //C++ guard
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif
char char_t
Definition: compiler_port.h:48
int bool_t
Definition: compiler_port.h:53
error_t
Error codes.
Definition: error.h:43
char_t name[]
Secure Shell (SSH)
#define SshConnection
Definition: ssh.h:883
SSH certificate import functions.
error_t sshVerifyPrincipal(const SshCertificate *cert, const char_t *name)
Verify principal name.
error_t sshVerifyServerCertificate(SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *hostKey)
Verify server's certificate.
error_t sshVerifyCertSignature(SshConnection *connection, const SshCertificate *cert)
Verify certificate signature.
error_t sshVerifyCriticalOptions(SshConnection *connection, const SshCertificate *cert)
Verify critical options.
error_t sshVerifyClientCertificate(SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *hostKey, bool_t flag)
Verify client's certificate.
error_t sshVerifySrcAddrOption(SshConnection *connection, const SshBinaryString *optionData)
Verify "source-address" option.
error_t sshVerifyValidity(const SshCertificate *cert)
Verify validity period.
Binary string.
Definition: ssh_types.h:67
SSH certificate (OpenSSH format)
String.
Definition: ssh_types.h:56