mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-13 03:30:28 +09:00
fido2: implement the default sk_callbacks for FIDO2/U2F keys using the usb-hid protocol
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:
@@ -23,9 +23,14 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "libssh/callbacks.h"
|
||||
#include "libssh/priv.h"
|
||||
#include "libssh/sk_common.h"
|
||||
|
||||
#ifdef HAVE_LIBFIDO2
|
||||
#include "libssh/sk_usbhid.h"
|
||||
#endif
|
||||
|
||||
const char *ssh_sk_err_to_string(int sk_err)
|
||||
{
|
||||
switch (sk_err) {
|
||||
@@ -274,3 +279,12 @@ bool sk_callbacks_check_compatibility(
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const struct ssh_sk_callbacks_struct *ssh_sk_get_default_callbacks(void)
|
||||
{
|
||||
#ifdef HAVE_LIBFIDO2
|
||||
return ssh_sk_get_usbhid_callbacks();
|
||||
#else
|
||||
return NULL;
|
||||
#endif /* HAVE_LIBFIDO2 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user