feat(pki): add ssh_pki_ctx to ssh_session

The session struct now contains an ssh_pki_ctx struct as its member to allow for passing user configured pki options across many functions.
The ssh_options_set API has been extended to allow users to set this member.

Signed-off-by: Praneeth Sarode <praneethsarode@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Eshan Kelkar <eshankelkar@galorithm.com>
This commit is contained in:
Praneeth Sarode
2025-09-20 20:26:37 +05:30
parent d4b0de702b
commit 97e71606e0
4 changed files with 45 additions and 0 deletions

View File

@@ -421,6 +421,7 @@ enum ssh_options_e {
SSH_OPTIONS_CERTIFICATE,
SSH_OPTIONS_PROXYJUMP,
SSH_OPTIONS_PROXYJUMP_CB_LIST_APPEND,
SSH_OPTIONS_PKI_CONTEXT,
};
enum {

View File

@@ -288,6 +288,10 @@ struct ssh_session_struct {
/* counters */
ssh_counter socket_counter;
ssh_counter raw_counter;
/* PKI context structure containing various parameters to configure PKI
* operations */
struct ssh_pki_ctx_struct *pki_context;
};
/** @internal