Rename: _get_conf_block -> sc_get_conf_block and put it into opensc.h

This way it can be used by OpenSC tokend module.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2828 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2006-01-31 15:53:44 +00:00
parent 525613ad5a
commit 670c0ee063
5 changed files with 4 additions and 6 deletions

View File

@ -863,7 +863,7 @@ int _sc_check_forced_protocol(sc_context_t *ctx, u8 *atr, size_t atr_len, unsign
return ok;
}
scconf_block *_get_conf_block(sc_context_t *ctx, const char *name1, const char *name2, int priority)
scconf_block *sc_get_conf_block(sc_context_t *ctx, const char *name1, const char *name2, int priority)
{
int i;
scconf_block *conf_block = NULL;

View File

@ -87,9 +87,6 @@ struct sc_algorithm_info * _sc_card_find_rsa_alg(struct sc_card *card,
int sc_asn1_read_tag(const u8 ** buf, size_t buflen, unsigned int *cla_out,
unsigned int *tag_out, size_t *taglen);
scconf_block *_get_conf_block(sc_context_t *ctx, const char *name1, const char *name2, int priority);
/********************************************************************/
/* pkcs1 padding/encoding functions */
/********************************************************************/

View File

@ -976,6 +976,7 @@ const sc_path_t *sc_get_mf_path(void);
int sc_hex_to_bin(const char *in, u8 *out, size_t *outlen);
int sc_bin_to_hex(const u8 *, size_t, char *, size_t, int separator);
scconf_block *sc_get_conf_block(sc_context_t *ctx, const char *name1, const char *name2, int priority);
/**
* Converts a given OID in ascii form to a internal sc_object_id object
* @param oid OUT sc_object_id object for the result

View File

@ -92,7 +92,7 @@ openct_reader_init(sc_context_t *ctx, void **priv_data)
max=OPENCT_MAX_READERS;
conf_block = _get_conf_block(ctx, "reader_driver", "openct", 1);
conf_block = sc_get_conf_block(ctx, "reader_driver", "openct", 1);
if (conf_block) {
max = scconf_get_int(conf_block, "readers", OPENCT_MAX_READERS);
}

View File

@ -617,7 +617,7 @@ static int pcsc_init(sc_context_t *ctx, void **reader_data)
}
gpriv->pcsc_ctx = pcsc_ctx;
conf_block = _get_conf_block(ctx, "reader_driver", "pcsc", 1);
conf_block = sc_get_conf_block(ctx, "reader_driver", "pcsc", 1);
if (conf_block) {
gpriv->connect_reset =
scconf_get_bool(conf_block, "connect_reset", 1);