make app_name, options and option_help static.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3192 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
fa12a3dd4f
commit
cea32a8016
|
@ -34,12 +34,12 @@
|
|||
#include <opensc/opensc.h>
|
||||
#include "util.h"
|
||||
|
||||
const char *app_name = "cardos-info";
|
||||
static const char *app_name = "cardos-info";
|
||||
|
||||
static int opt_reader = -1, opt_debug = 0, opt_wait = 0;
|
||||
static int verbose = 0;
|
||||
|
||||
const struct option options[] = {
|
||||
static const struct option options[] = {
|
||||
{"reader", 1, NULL, 'r'},
|
||||
{"card-driver", 1, NULL, 'c'},
|
||||
{"wait", 0, NULL, 'w'},
|
||||
|
@ -47,7 +47,7 @@ const struct option options[] = {
|
|||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
const char *option_help[] = {
|
||||
static const char *option_help[] = {
|
||||
"Uses reader number <arg> [0]",
|
||||
"Forces the use of driver <arg> [auto-detect]",
|
||||
"Wait for a card to be inserted",
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "util.h"
|
||||
#include "strlcpy.h"
|
||||
|
||||
const char *app_name = "cryptoflex-tool";
|
||||
static const char *app_name = "cryptoflex-tool";
|
||||
|
||||
static int opt_reader = 0;
|
||||
static int opt_key_num = 1, opt_pin_num = -1;
|
||||
|
@ -44,7 +44,7 @@ static int opt_puk_attempts = 10;
|
|||
static const char *opt_appdf = NULL, *opt_prkeyf = NULL, *opt_pubkeyf = NULL;
|
||||
static u8 *pincode = NULL;
|
||||
|
||||
const struct option options[] = {
|
||||
static const struct option options[] = {
|
||||
{ "list-keys", 0, NULL, 'l' },
|
||||
{ "create-key-files", 1, NULL, 'c' },
|
||||
{ "create-pin-file", 1, NULL, 'P' },
|
||||
|
@ -62,7 +62,7 @@ const struct option options[] = {
|
|||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
const char *option_help[] = {
|
||||
static const char *option_help[] = {
|
||||
"Lists all keys in a public key file",
|
||||
"Creates new RSA key files for <arg> keys",
|
||||
"Creates a new CHV<arg> file",
|
||||
|
|
|
@ -40,7 +40,7 @@ static int stats = 0;
|
|||
static char *exec_program = NULL;
|
||||
static int exit_status = EXIT_FAILURE;
|
||||
|
||||
const struct option options[] = {
|
||||
static const struct option options[] = {
|
||||
{"reader", required_argument, NULL, 'r'},
|
||||
{"print", no_argument, NULL, 'n'},
|
||||
{"exec", required_argument, NULL, 'x'},
|
||||
|
@ -51,8 +51,8 @@ const struct option options[] = {
|
|||
};
|
||||
|
||||
/* Probably not used, but needed to build on Windows */
|
||||
const char *app_name = "eidenv";
|
||||
const char *option_help[] = {NULL};
|
||||
static const char *app_name = "eidenv";
|
||||
static const char *option_help[] = {NULL};
|
||||
|
||||
static struct {
|
||||
const char *name;
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
|
||||
|
||||
const char *app_name = "opensc-explorer";
|
||||
static const char *app_name = "opensc-explorer";
|
||||
|
||||
static int opt_reader = -1, opt_wait = 0, verbose = 0;
|
||||
static const char *opt_driver = NULL;
|
||||
|
@ -45,14 +45,14 @@ static sc_path_t current_path;
|
|||
static sc_context_t *ctx = NULL;
|
||||
static sc_card_t *card = NULL;
|
||||
|
||||
const struct option options[] = {
|
||||
static const struct option options[] = {
|
||||
{ "reader", 1, NULL, 'r' },
|
||||
{ "card-driver", 1, NULL, 'c' },
|
||||
{ "wait", 1, NULL, 'w' },
|
||||
{ "verbose", 0, NULL, 'v' },
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
const char *option_help[] = {
|
||||
static const char *option_help[] = {
|
||||
"Uses reader number <arg> [0]",
|
||||
"Forces the use of driver <arg> [auto-detect]",
|
||||
"Wait for card insertion",
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include <opensc/cardctl.h>
|
||||
#include "util.h"
|
||||
|
||||
const char *app_name = "opensc-tool";
|
||||
static const char *app_name = "opensc-tool";
|
||||
|
||||
static int opt_reader = -1,
|
||||
opt_wait = 0;
|
||||
|
@ -46,7 +46,7 @@ enum {
|
|||
OPT_SERIAL = 0x100,
|
||||
};
|
||||
|
||||
const struct option options[] = {
|
||||
static const struct option options[] = {
|
||||
{ "atr", 0, NULL, 'a' },
|
||||
{ "serial", 0, NULL, OPT_SERIAL },
|
||||
{ "name", 0, NULL, 'n' },
|
||||
|
@ -62,7 +62,7 @@ const struct option options[] = {
|
|||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
const char *option_help[] = {
|
||||
static static const char *option_help[] = {
|
||||
"Prints the ATR bytes of the card",
|
||||
"Prints the card serial number",
|
||||
"Identify the card and print its name",
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <openssl/pem.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
const char *app_name = "piv-tool";
|
||||
static const char *app_name = "piv-tool";
|
||||
|
||||
static int opt_reader = -1,
|
||||
opt_wait = 0;
|
||||
|
@ -53,7 +53,7 @@ enum {
|
|||
OPT_SERIAL = 0x100,
|
||||
};
|
||||
|
||||
const struct option options[] = {
|
||||
static const struct option options[] = {
|
||||
{ "serial", 0, NULL, OPT_SERIAL },
|
||||
{ "name", 0, NULL, 'n' },
|
||||
{ "admin", 0, NULL, 'A' },
|
||||
|
@ -72,7 +72,7 @@ const struct option options[] = {
|
|||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
const char *option_help[] = {
|
||||
static const char *option_help[] = {
|
||||
"Prints the card serial number",
|
||||
"Identify the card and print its name",
|
||||
"authenticate using default 3des key",
|
||||
|
|
|
@ -56,7 +56,7 @@ enum {
|
|||
OPT_PRIVATE
|
||||
};
|
||||
|
||||
const struct option options[] = {
|
||||
static const struct option options[] = {
|
||||
{ "show-info", 0, NULL, 'I' },
|
||||
{ "list-slots", 0, NULL, 'L' },
|
||||
{ "list-mechanisms", 0, NULL, 'M' },
|
||||
|
@ -97,7 +97,7 @@ const struct option options[] = {
|
|||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
const char *option_help[] = {
|
||||
static const char *option_help[] = {
|
||||
"Show global token information",
|
||||
"List slots available on the token",
|
||||
"List mechanisms supported by the token",
|
||||
|
@ -136,7 +136,7 @@ const char *option_help[] = {
|
|||
"Set the CKA_PRIVATE attribute (object is only viewable after a login)"
|
||||
};
|
||||
|
||||
const char * app_name = "pkcs11-tool"; /* for utils.c */
|
||||
static const char * app_name = "pkcs11-tool"; /* for utils.c */
|
||||
|
||||
static int verbose = 0;
|
||||
static const char * opt_input = NULL;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#endif
|
||||
#include "util.h"
|
||||
|
||||
const char *app_name = "pkcs15-crypt";
|
||||
static const char *app_name = "pkcs15-crypt";
|
||||
|
||||
static int opt_reader = -1, verbose = 0, opt_wait = 0, opt_raw = 0;
|
||||
static char * opt_pincode = NULL, * opt_key_id = NULL;
|
||||
|
@ -54,7 +54,7 @@ enum {
|
|||
OPT_PKCS1,
|
||||
};
|
||||
|
||||
const struct option options[] = {
|
||||
static const struct option options[] = {
|
||||
{ "sign", 0, NULL, 's' },
|
||||
{ "decipher", 0, NULL, 'c' },
|
||||
{ "key", 1, NULL, 'k' },
|
||||
|
@ -75,7 +75,7 @@ const struct option options[] = {
|
|||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
const char *option_help[] = {
|
||||
static const char *option_help[] = {
|
||||
"Performs digital signature operation",
|
||||
"Decipher operation",
|
||||
"Selects the private key ID to use",
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
|
||||
#undef GET_KEY_ECHO_OFF
|
||||
|
||||
const char *app_name = "pkcs15-init";
|
||||
static const char *app_name = "pkcs15-init";
|
||||
|
||||
/* Handle encoding of PKCS15 on the card */
|
||||
typedef int (*pkcs15_encoder)(sc_context_t *,
|
||||
|
@ -186,7 +186,7 @@ const struct option options[] = {
|
|||
{ "secret", required_argument, NULL, OPT_SECRET },
|
||||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
const char * option_help[] = {
|
||||
static const char * option_help[] = {
|
||||
"Erase the smart card (can be used with --create-pkcs15)",
|
||||
"Creates a new PKCS #15 structure",
|
||||
"Store a new PIN/PUK on the card",
|
||||
|
|
|
@ -38,7 +38,7 @@ typedef unsigned __int32 uint32_t;
|
|||
#include <opensc/pkcs15.h>
|
||||
#include "util.h"
|
||||
|
||||
const char *app_name = "pkcs15-tool";
|
||||
static const char *app_name = "pkcs15-tool";
|
||||
|
||||
static int opt_reader = -1, opt_wait = 0;
|
||||
static int opt_no_cache = 0;
|
||||
|
@ -74,7 +74,7 @@ enum {
|
|||
static int authenticate(sc_pkcs15_object_t *obj);
|
||||
static int pem_encode(int, sc_pkcs15_der_t *, sc_pkcs15_der_t *);
|
||||
|
||||
const struct option options[] = {
|
||||
static const struct option options[] = {
|
||||
{ "learn-card", no_argument, NULL, 'L' },
|
||||
{ "read-certificate", required_argument, NULL, 'r' },
|
||||
{ "list-certificates", no_argument, NULL, 'c' },
|
||||
|
@ -102,7 +102,7 @@ const struct option options[] = {
|
|||
{ NULL, 0, NULL, 0 }
|
||||
};
|
||||
|
||||
const char *option_help[] = {
|
||||
static const char *option_help[] = {
|
||||
"Stores card info to cache",
|
||||
"Reads certificate with ID <arg>",
|
||||
"Lists certificates",
|
||||
|
|
Loading…
Reference in New Issue