summaryrefslogtreecommitdiff
path: root/tools/extern.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/extern.h')
-rw-r--r--tools/extern.h64
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
10struct 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
25EC_KEY *read_ec_pubkey(const char *);
26fido_dev_t *open_dev(const char *);
27FILE *open_read(const char *);
28FILE *open_write(const char *);
29int assert_get(int, char **);
30int assert_verify(int, char **);
31int base64_decode(char *, void **, size_t *);
32int base64_encode(const void *, size_t, char **);
33int base64_read(FILE *, struct blob *);
34int bio_delete(fido_dev_t *, char *, char *);
35int bio_enroll(char *);
36void bio_info(fido_dev_t *);
37int bio_list(char *);
38int bio_set_name(char *, char *, char *);
39int cred_make(int, char **);
40int cred_verify(int, char **);
41int credman_delete_rk(fido_dev_t *, const char *, char *);
42int credman_get_metadata(fido_dev_t *, const char *);
43int credman_list_rk(char *, const char *);
44int credman_list_rp(char *);
45int credman_print_rk(fido_dev_t *, const char *, char *, char *);
46int pin_change(char *);
47int pin_set(char *);
48int string_read(FILE *, char **);
49int token_delete(int, char **, char *);
50int token_info(int, char **, char *);
51int token_list(int, char **, char *);
52int token_reset(char *);
53int token_set(int, char **, char *);
54int write_ec_pubkey(FILE *, const void *, size_t);
55int write_rsa_pubkey(FILE *, const void *, size_t);
56RSA *read_rsa_pubkey(const char *);
57EVP_PKEY *read_eddsa_pubkey(const char *);
58int write_eddsa_pubkey(FILE *, const void *, size_t);
59void print_cred(FILE *, int, const fido_cred_t *);
60void read_pin(const char *, char *, size_t);
61void usage(void);
62void xxd(const void *, size_t);
63
64#endif /* _EXTERN_H_ */