libssh: /build/libssh/src/libssh-0.12.2/include/libssh/pki_context.h Source File

libssh 0.12.2 The SSH library

Loading...
Searching...
No Matches
pki_context.h
1/*
2 * This file is part of the SSH Library
3 *
4 * Copyright (c) 2025 Praneeth Sarode <praneethsarode@gmail.com>
5 *
6 * The SSH Library is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, version 2.1 of the License.
9 *
10 * The SSH Library is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13 * License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with the SSH Library; see the file COPYING. If not, write to
17 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18 * MA 02111-1307, USA.
19 */
20
21#ifndef PKI_CONTEXT_H
22#define PKI_CONTEXT_H
23
24#include "libssh/callbacks.h"
25#include "libssh/libssh.h"
26
33 struct ssh_pki_ctx_struct {
40 int rsa_key_size;
41
46 const struct ssh_sk_callbacks_struct *sk_callbacks;
47
53 char *sk_application;
54
63 uint8_t sk_flags;
64
71 ssh_auth_callback sk_pin_callback;
72
79 void *sk_userdata;
80
86 ssh_buffer sk_challenge_buffer;
87
92 struct sk_option **sk_callbacks_options;
93
97 ssh_buffer sk_attestation_buffer;
98};
99
100/* Internal PKI context functions */
101ssh_pki_ctx ssh_pki_ctx_dup(const ssh_pki_ctx context);
102
103#endif /* PKI_CONTEXT_H */
ssh_auth_callback
int(* ssh_auth_callback)(const char *prompt, char *buf, size_t len, int echo, int verify, void *userdata)
SSH authentication callback for password and publickey auth.
Definition libssh.h:713
ssh_pki_ctx_dup
ssh_pki_ctx ssh_pki_ctx_dup(const ssh_pki_ctx context)
Duplicate an existing PKI context.
Definition pki_context.c:512
sk_option
Configuration option structure for FIDO2/U2F operations.
Definition sk_api.h:263
ssh_pki_ctx_struct
Security key context structure.
Definition pki_context.h:33
ssh_pki_ctx_struct::sk_callbacks
const struct ssh_sk_callbacks_struct * sk_callbacks
Security key callbacks.
Definition pki_context.h:46
ssh_pki_ctx_struct::rsa_key_size
int rsa_key_size
Desired RSA modulus size in bits.
Definition pki_context.h:40
ssh_pki_ctx_struct::sk_application
char * sk_application
Application identifier string for the security key credential.
Definition pki_context.h:53
ssh_pki_ctx_struct::sk_userdata
void * sk_userdata
User supplied pointer passed to callbacks (optional).
Definition pki_context.h:79
ssh_pki_ctx_struct::sk_attestation_buffer
ssh_buffer sk_attestation_buffer
The buffer used to store attestation information returned in a key enrollment operation.
Definition pki_context.h:97
ssh_pki_ctx_struct::sk_pin_callback
ssh_auth_callback sk_pin_callback
PIN callback for authenticator user verification (optional).
Definition pki_context.h:71
ssh_pki_ctx_struct::sk_callbacks_options
struct sk_option ** sk_callbacks_options
Options to be passed to the sk_callbacks (optional).
Definition pki_context.h:92
ssh_pki_ctx_struct::sk_flags
uint8_t sk_flags
FIDO2 operation flags.
Definition pki_context.h:63
ssh_pki_ctx_struct::sk_challenge_buffer
ssh_buffer sk_challenge_buffer
Custom challenge data for enrollment (optional).
Definition pki_context.h:86
ssh_sk_callbacks_struct
FIDO2/U2F security key callbacks structure.
Definition callbacks.h:1312