-
Notifications
You must be signed in to change notification settings - Fork 1
/
util_opensc.h
45 lines (37 loc) · 1.21 KB
/
util_opensc.h
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
#ifndef UTIL_OPENSC_H
#define UTIL_OPENSC_H
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/stat.h>
#include "common/compat_getopt.h"
#include "libopensc/opensc.h"
#ifdef __cplusplus
extern "C" {
#endif
void util_print_binary(FILE *f, const u8 *buf, int count);
void util_hex_dump(FILE *f, const u8 *in, int len, const char *sep);
void util_hex_dump_asc(FILE *f, const u8 *in, size_t count, int addr);
void util_print_usage_and_die(const char *app_name, const struct option options[],
const char *option_help[], const char *args);
const char * util_acl_to_str(const struct sc_acl_entry *e);
void util_debug(const char *fmt, ...);
void util_warn(const char *fmt, ...);
void util_error(const char *fmt, ...);
void util_fatal(const char *fmt, ...);
/* All singing all dancing card connect routine */
int util_connect_card(struct sc_context *, struct sc_card **, const char *reader_id, int wait, int verbose);
int util_getpass (char **lineptr, size_t *n, FILE *stream);
#ifdef __cplusplus
}
#endif
#endif