Loading...
Searching...
No Matches
pki_context.h
/*
* This file is part of the SSH Library
*
* Copyright (c) 2025 Praneeth Sarode <praneethsarode@gmail.com>
*
* The SSH Library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, version 2.1 of the License.
*
* The SSH Library 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 Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the SSH Library; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
#ifndef PKI_CONTEXT_H
#define PKI_CONTEXT_H
#include "libssh/callbacks.h"
#include "libssh/libssh.h"
struct ssh_pki_ctx_struct {
int rsa_key_size;
const struct ssh_sk_callbacks_struct *sk_callbacks;
char *sk_application;
uint8_t sk_flags;
ssh_auth_callback sk_pin_callback;
void *sk_userdata;
ssh_buffer sk_challenge_buffer;
struct sk_option **sk_callbacks_options;
ssh_buffer sk_attestation_buffer;
};
/* Internal PKI context functions */
ssh_pki_ctx ssh_pki_ctx_dup(const ssh_pki_ctx context);
#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:1311