diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:45 +0000 |
commit | efeb864cb547a2cbf96dc0053a8bdb4d9190b364 (patch) | |
tree | c0b83368f18be983fcc763200c4c24d633244588 /src/shared/libfido2-util.h | |
parent | Releasing progress-linux version 255.5-1~progress7.99u1. (diff) | |
download | systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.tar.xz systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.zip |
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/libfido2-util.h')
-rw-r--r-- | src/shared/libfido2-util.h | 100 |
1 files changed, 52 insertions, 48 deletions
diff --git a/src/shared/libfido2-util.h b/src/shared/libfido2-util.h index 4cfc95f..5e40b2a 100644 --- a/src/shared/libfido2-util.h +++ b/src/shared/libfido2-util.h @@ -17,53 +17,56 @@ typedef enum Fido2EnrollFlags { #if HAVE_LIBFIDO2 #include <fido.h> -extern int (*sym_fido_assert_allow_cred)(fido_assert_t *, const unsigned char *, size_t); -extern void (*sym_fido_assert_free)(fido_assert_t **); -extern size_t (*sym_fido_assert_hmac_secret_len)(const fido_assert_t *, size_t); -extern const unsigned char* (*sym_fido_assert_hmac_secret_ptr)(const fido_assert_t *, size_t); -extern fido_assert_t* (*sym_fido_assert_new)(void); -extern int (*sym_fido_assert_set_clientdata_hash)(fido_assert_t *, const unsigned char *, size_t); -extern int (*sym_fido_assert_set_extensions)(fido_assert_t *, int); -extern int (*sym_fido_assert_set_hmac_salt)(fido_assert_t *, const unsigned char *, size_t); -extern int (*sym_fido_assert_set_rp)(fido_assert_t *, const char *); -extern int (*sym_fido_assert_set_up)(fido_assert_t *, fido_opt_t); -extern int (*sym_fido_assert_set_uv)(fido_assert_t *, fido_opt_t); -extern size_t (*sym_fido_cbor_info_extensions_len)(const fido_cbor_info_t *); -extern char **(*sym_fido_cbor_info_extensions_ptr)(const fido_cbor_info_t *); -extern void (*sym_fido_cbor_info_free)(fido_cbor_info_t **); -extern fido_cbor_info_t* (*sym_fido_cbor_info_new)(void); -extern size_t (*sym_fido_cbor_info_options_len)(const fido_cbor_info_t *); -extern char** (*sym_fido_cbor_info_options_name_ptr)(const fido_cbor_info_t *); -extern const bool* (*sym_fido_cbor_info_options_value_ptr)(const fido_cbor_info_t *); -extern void (*sym_fido_cred_free)(fido_cred_t **); -extern size_t (*sym_fido_cred_id_len)(const fido_cred_t *); -extern const unsigned char* (*sym_fido_cred_id_ptr)(const fido_cred_t *); -extern fido_cred_t* (*sym_fido_cred_new)(void); -extern int (*sym_fido_cred_set_clientdata_hash)(fido_cred_t *, const unsigned char *, size_t); -extern int (*sym_fido_cred_set_extensions)(fido_cred_t *, int); -extern int (*sym_fido_cred_set_rk)(fido_cred_t *, fido_opt_t); -extern int (*sym_fido_cred_set_rp)(fido_cred_t *, const char *, const char *); -extern int (*sym_fido_cred_set_type)(fido_cred_t *, int); -extern int (*sym_fido_cred_set_user)(fido_cred_t *, const unsigned char *, size_t, const char *, const char *, const char *); -extern int (*sym_fido_cred_set_uv)(fido_cred_t *, fido_opt_t); -extern void (*sym_fido_dev_free)(fido_dev_t **); -extern int (*sym_fido_dev_get_assert)(fido_dev_t *, fido_assert_t *, const char *); -extern int (*sym_fido_dev_get_cbor_info)(fido_dev_t *, fido_cbor_info_t *); -extern void (*sym_fido_dev_info_free)(fido_dev_info_t **, size_t); -extern int (*sym_fido_dev_info_manifest)(fido_dev_info_t *, size_t, size_t *); -extern const char* (*sym_fido_dev_info_manufacturer_string)(const fido_dev_info_t *); -extern const char* (*sym_fido_dev_info_product_string)(const fido_dev_info_t *); -extern fido_dev_info_t* (*sym_fido_dev_info_new)(size_t); -extern const char* (*sym_fido_dev_info_path)(const fido_dev_info_t *); -extern const fido_dev_info_t* (*sym_fido_dev_info_ptr)(const fido_dev_info_t *, size_t); -extern bool (*sym_fido_dev_is_fido2)(const fido_dev_t *); -extern int (*sym_fido_dev_make_cred)(fido_dev_t *, fido_cred_t *, const char *); -extern fido_dev_t* (*sym_fido_dev_new)(void); -extern int (*sym_fido_dev_open)(fido_dev_t *, const char *); -extern int (*sym_fido_dev_close)(fido_dev_t *); -extern void (*sym_fido_init)(int); -extern void (*sym_fido_set_log_handler)(fido_log_handler_t *); -extern const char* (*sym_fido_strerr)(int); +#include "dlfcn-util.h" + +DLSYM_PROTOTYPE(fido_assert_allow_cred); +DLSYM_PROTOTYPE(fido_assert_free); +DLSYM_PROTOTYPE(fido_assert_hmac_secret_len); +DLSYM_PROTOTYPE(fido_assert_hmac_secret_ptr); +DLSYM_PROTOTYPE(fido_assert_new); +DLSYM_PROTOTYPE(fido_assert_set_clientdata_hash); +DLSYM_PROTOTYPE(fido_assert_set_extensions); +DLSYM_PROTOTYPE(fido_assert_set_hmac_salt); +DLSYM_PROTOTYPE(fido_assert_set_rp); +DLSYM_PROTOTYPE(fido_assert_set_up); +DLSYM_PROTOTYPE(fido_assert_set_uv); +DLSYM_PROTOTYPE(fido_cbor_info_extensions_len); +DLSYM_PROTOTYPE(fido_cbor_info_extensions_ptr); +DLSYM_PROTOTYPE(fido_cbor_info_free); +DLSYM_PROTOTYPE(fido_cbor_info_new); +DLSYM_PROTOTYPE(fido_cbor_info_options_len); +DLSYM_PROTOTYPE(fido_cbor_info_options_name_ptr); +DLSYM_PROTOTYPE(fido_cbor_info_options_value_ptr); +DLSYM_PROTOTYPE(fido_cred_free); +DLSYM_PROTOTYPE(fido_cred_id_len); +DLSYM_PROTOTYPE(fido_cred_id_ptr); +DLSYM_PROTOTYPE(fido_cred_new); +DLSYM_PROTOTYPE(fido_cred_set_clientdata_hash); +DLSYM_PROTOTYPE(fido_cred_set_extensions); +DLSYM_PROTOTYPE(fido_cred_set_prot); +DLSYM_PROTOTYPE(fido_cred_set_rk); +DLSYM_PROTOTYPE(fido_cred_set_rp); +DLSYM_PROTOTYPE(fido_cred_set_type); +DLSYM_PROTOTYPE(fido_cred_set_user); +DLSYM_PROTOTYPE(fido_cred_set_uv); +DLSYM_PROTOTYPE(fido_dev_free); +DLSYM_PROTOTYPE(fido_dev_get_assert); +DLSYM_PROTOTYPE(fido_dev_get_cbor_info); +DLSYM_PROTOTYPE(fido_dev_info_free); +DLSYM_PROTOTYPE(fido_dev_info_manifest); +DLSYM_PROTOTYPE(fido_dev_info_manufacturer_string); +DLSYM_PROTOTYPE(fido_dev_info_product_string); +DLSYM_PROTOTYPE(fido_dev_info_new); +DLSYM_PROTOTYPE(fido_dev_info_path); +DLSYM_PROTOTYPE(fido_dev_info_ptr); +DLSYM_PROTOTYPE(fido_dev_is_fido2); +DLSYM_PROTOTYPE(fido_dev_make_cred); +DLSYM_PROTOTYPE(fido_dev_new); +DLSYM_PROTOTYPE(fido_dev_open); +DLSYM_PROTOTYPE(fido_dev_close); +DLSYM_PROTOTYPE(fido_init); +DLSYM_PROTOTYPE(fido_set_log_handler); +DLSYM_PROTOTYPE(fido_strerr); int dlopen_libfido2(void); @@ -109,7 +112,8 @@ int fido2_generate_hmac_hash( const char *user_name, const char *user_display_name, const char *user_icon, - const char *askpw_icon_name, + const char *askpw_icon, + const char *askpw_credential, Fido2EnrollFlags lock_with, int cred_alg, void **ret_cid, size_t *ret_cid_size, |