/usr/include/u2f-host/u2f-host.h is in libu2f-host-dev 1.1.4-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | /*
Copyright (C) 2013-2015 Yubico AB
This program 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; either version 2.1, or (at your option) any
later version.
This program 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 this program; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef U2F_HOST_H
#define U2F_HOST_H
// Visual studio 2008 and earlier are missing stdint.h
#if defined _MSC_VER && _MSC_VER <= 1500 && !defined HAVE_STDINT_H
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned long int uint64_t;
#else
#include <stdint.h>
#endif
#include <string.h>
#include <u2f-host-version.h>
#include <u2f-host-types.h>
#if defined _MSC_VER
#define U2FH_EXPORT __declspec(dllexport)
#else
#define U2FH_EXPORT extern
#endif
#ifdef __cplusplus
extern "C"
{
#endif
/* Must be called successfully before using any other functions. */
U2FH_EXPORT u2fh_rc u2fh_global_init (u2fh_initflags flags);
U2FH_EXPORT void u2fh_global_done (void);
U2FH_EXPORT const char *u2fh_strerror (int err);
U2FH_EXPORT const char *u2fh_strerror_name (int err);
U2FH_EXPORT u2fh_rc u2fh_devs_init (u2fh_devs ** devs);
U2FH_EXPORT u2fh_rc u2fh_devs_discover (u2fh_devs * devs, unsigned *max_index);
U2FH_EXPORT void u2fh_devs_done (u2fh_devs * devs);
U2FH_EXPORT u2fh_rc u2fh_register (u2fh_devs * devs,
const char *challenge,
const char *origin,
char **response, u2fh_cmdflags flags);
U2FH_EXPORT u2fh_rc u2fh_register2 (u2fh_devs * devs,
const char *challenge,
const char *origin,
char *response, size_t * response_len,
u2fh_cmdflags flags);
U2FH_EXPORT u2fh_rc u2fh_authenticate (u2fh_devs * devs,
const char *challenge,
const char *origin,
char **response, u2fh_cmdflags flags);
U2FH_EXPORT u2fh_rc u2fh_authenticate2 (u2fh_devs * devs,
const char *challenge,
const char *origin,
char *response, size_t * response_len,
u2fh_cmdflags flags);
U2FH_EXPORT u2fh_rc u2fh_sendrecv (u2fh_devs * devs,
unsigned index,
uint8_t cmd,
const unsigned char *send,
uint16_t sendlen,
unsigned char *recv, size_t * recvlen);
U2FH_EXPORT u2fh_rc u2fh_get_device_description (u2fh_devs * devs,
unsigned index, char *out,
size_t * len);
U2FH_EXPORT int u2fh_is_alive (u2fh_devs * devs, unsigned index);
#ifdef __cplusplus
}
#endif
#endif
|