diff options
Diffstat (limited to 'tools/extern.h')
-rw-r--r-- | tools/extern.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tools/extern.h b/tools/extern.h new file mode 100644 index 0000000..e79e6f0 --- /dev/null +++ b/tools/extern.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2018 Yubico AB. All rights reserved. | ||
3 | * Use of this source code is governed by a BSD-style | ||
4 | * license that can be found in the LICENSE file. | ||
5 | */ | ||
6 | |||
7 | #ifndef _EXTERN_H_ | ||
8 | #define _EXTERN_H_ | ||
9 | |||
10 | struct blob { | ||
11 | unsigned char *ptr; | ||
12 | size_t len; | ||
13 | }; | ||
14 | |||
15 | #define TOKEN_OPT "CDILPRSVbcdei:k:n:r" | ||
16 | |||
17 | #define FLAG_DEBUG 0x01 | ||
18 | #define FLAG_QUIET 0x02 | ||
19 | #define FLAG_RK 0x04 | ||
20 | #define FLAG_UV 0x08 | ||
21 | #define FLAG_U2F 0x10 | ||
22 | #define FLAG_HMAC 0x20 | ||
23 | #define FLAG_UP 0x40 | ||
24 | |||
25 | EC_KEY *read_ec_pubkey(const char *); | ||
26 | fido_dev_t *open_dev(const char *); | ||
27 | FILE *open_read(const char *); | ||
28 | FILE *open_write(const char *); | ||
29 | int assert_get(int, char **); | ||
30 | int assert_verify(int, char **); | ||
31 | int base64_decode(char *, void **, size_t *); | ||
32 | int base64_encode(const void *, size_t, char **); | ||
33 | int base64_read(FILE *, struct blob *); | ||
34 | int bio_delete(fido_dev_t *, char *, char *); | ||
35 | int bio_enroll(char *); | ||
36 | void bio_info(fido_dev_t *); | ||
37 | int bio_list(char *); | ||
38 | int bio_set_name(char *, char *, char *); | ||
39 | int cred_make(int, char **); | ||
40 | int cred_verify(int, char **); | ||
41 | int credman_delete_rk(fido_dev_t *, const char *, char *); | ||
42 | int credman_get_metadata(fido_dev_t *, const char *); | ||
43 | int credman_list_rk(char *, const char *); | ||
44 | int credman_list_rp(char *); | ||
45 | int credman_print_rk(fido_dev_t *, const char *, char *, char *); | ||
46 | int pin_change(char *); | ||
47 | int pin_set(char *); | ||
48 | int string_read(FILE *, char **); | ||
49 | int token_delete(int, char **, char *); | ||
50 | int token_info(int, char **, char *); | ||
51 | int token_list(int, char **, char *); | ||
52 | int token_reset(char *); | ||
53 | int token_set(int, char **, char *); | ||
54 | int write_ec_pubkey(FILE *, const void *, size_t); | ||
55 | int write_rsa_pubkey(FILE *, const void *, size_t); | ||
56 | RSA *read_rsa_pubkey(const char *); | ||
57 | EVP_PKEY *read_eddsa_pubkey(const char *); | ||
58 | int write_eddsa_pubkey(FILE *, const void *, size_t); | ||
59 | void print_cred(FILE *, int, const fido_cred_t *); | ||
60 | void read_pin(const char *, char *, size_t); | ||
61 | void usage(void); | ||
62 | void xxd(const void *, size_t); | ||
63 | |||
64 | #endif /* _EXTERN_H_ */ | ||