Changeset 3177
- Timestamp:
- 06/21/07 10:07:01 (19 months ago)
- Location:
- trunk/src
- Files:
-
- 18 modified
-
common/strlcpy.c (modified) (1 diff)
-
libopensc/card-belpic.c (modified) (4 diffs)
-
libopensc/card-cardos.c (modified) (1 diff)
-
libopensc/card-gpk.c (modified) (3 diffs)
-
libopensc/card-incrypto34.c (modified) (7 diffs)
-
libopensc/card-jcop.c (modified) (3 diffs)
-
libopensc/card-mcrd.c (modified) (1 diff)
-
libopensc/card-oberthur.c (modified) (2 diffs)
-
libopensc/card.c (modified) (1 diff)
-
libopensc/muscle-filesystem.c (modified) (1 diff)
-
libopensc/opensc.h (modified) (3 diffs)
-
libopensc/pkcs15-prkey.c (modified) (1 diff)
-
libopensc/pkcs15-syn.c (modified) (1 diff)
-
libopensc/pkcs15.c (modified) (1 diff)
-
libopensc/reader-openct.c (modified) (8 diffs)
-
libopensc/sc.c (modified) (3 diffs)
-
libopensc/ui.c (modified) (5 diffs)
-
scconf/test-conf.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/strlcpy.c
r2990 r3177 22 22 #include <sys/types.h> 23 23 #include <string.h> 24 25 #include "strlcpy.h" 24 26 25 27 /* -
trunk/src/libopensc/card-belpic.c
r2993 r3177 423 423 }; 424 424 425 static inlinevoid TLVInit(struct tTLV *tlv, u8 * base, size_t size)425 static void TLVInit(struct tTLV *tlv, u8 * base, size_t size) 426 426 { 427 427 tlv->base = base; … … 430 430 } 431 431 432 static inlinevoid TLVNext(struct tTLV *tlv, u8 tag)432 static void TLVNext(struct tTLV *tlv, u8 tag) 433 433 { 434 434 assert(tlv->next + 2 < tlv->end); … … 438 438 } 439 439 440 static inlinevoid TLVAdd(struct tTLV *tlv, u8 val)440 static void TLVAdd(struct tTLV *tlv, u8 val) 441 441 { 442 442 assert(tlv->next + 1 < tlv->end); … … 445 445 } 446 446 447 static inlinevoid TLVAddBuffer(struct tTLV *tlv, u8 * val, size_t size)447 static void TLVAddBuffer(struct tTLV *tlv, u8 * val, size_t size) 448 448 { 449 449 assert(tlv->next + size < tlv->end); -
trunk/src/libopensc/card-cardos.c
r3115 r3177 31 31 static const struct sc_card_operations *iso_ops = NULL; 32 32 33 st ruct sc_card_operations cardos_ops;33 static struct sc_card_operations cardos_ops; 34 34 static struct sc_card_driver cardos_drv = { 35 35 "Siemens CardOS", -
trunk/src/libopensc/card-gpk.c
r3170 r3177 1665 1665 * GetInfo call 1666 1666 */ 1667 int 1668 gpk_get_info(sc_card_t *card, int p1, int p2, u8 *buf,size_t buflen)1667 static int gpk_get_info(sc_card_t *card, int p1, int p2, u8 *buf, 1668 size_t buflen) 1669 1669 { 1670 1670 sc_apdu_t apdu; … … 1871 1871 */ 1872 1872 static struct sc_card_driver * 1873 sc_get_driver( )1873 sc_get_driver(void) 1874 1874 { 1875 1875 struct sc_card_driver *iso_drv; … … 1899 1899 1900 1900 struct sc_card_driver * 1901 sc_get_gpk_driver( )1901 sc_get_gpk_driver(void) 1902 1902 { 1903 1903 return sc_get_driver(); -
trunk/src/libopensc/card-incrypto34.c
r3120 r3177 35 35 static const struct sc_card_operations *iso_ops = NULL; 36 36 37 st ruct sc_card_operations incrypto34_ops;38 st ruct sc_card_driver incrypto34_drv = {37 static struct sc_card_operations incrypto34_ops; 38 static struct sc_card_driver incrypto34_drv = { 39 39 "Incard Incripto34", 40 40 "incrypto34", … … 50 50 }; 51 51 52 int incrypto34_finish(struct sc_card *card)52 static int incrypto34_finish(struct sc_card *card) 53 53 { 54 54 return 0; 55 55 } 56 56 57 int incrypto34_match_card(struct sc_card *card)57 static int incrypto34_match_card(struct sc_card *card) 58 58 { 59 59 int i; … … 65 65 } 66 66 67 int incrypto34_init(sc_card_t *card)67 static int incrypto34_init(sc_card_t *card) 68 68 { 69 69 unsigned long flags; … … 165 165 } 166 166 167 168 int incrypto34_list_files(sc_card_t *card, u8 *buf, size_t buflen) 167 static int incrypto34_list_files(sc_card_t *card, u8 *buf, size_t buflen) 169 168 { 170 169 sc_apdu_t apdu; … … 415 414 * Restore the indicated SE 416 415 */ 417 static int 418 incrypto34_restore_security_env(sc_card_t *card, int se_num) 416 static int incrypto34_restore_security_env(sc_card_t *card, int se_num) 419 417 { 420 418 sc_apdu_t apdu; … … 444 442 * XXX Need to find out how the Aladdin drivers do it. 445 443 */ 446 static int 447 incrypto34_set_security_env(sc_card_t *card, 448 const sc_security_env_t *env, 449 int se_num) 444 static int incrypto34_set_security_env(sc_card_t *card, 445 const sc_security_env_t *env, int se_num) 450 446 { 451 447 sc_apdu_t apdu; … … 497 493 498 494 /* internal function to do the actual signature computation */ 499 static int 500 do_compute_signature(sc_card_t *card, const u8 *data, size_t datalen, 501 u8 *out, size_t outlen) 495 static int do_compute_signature(sc_card_t *card, 496 const u8 *data, size_t datalen, u8 *out, size_t outlen) 502 497 { 503 498 int r; -
trunk/src/libopensc/card-jcop.c
r2971 r3177 109 109 drvdata->invalid_senv=1; 110 110 drvdata->nfiles=-1; 111 drvdata->filelist= 0;111 drvdata->filelist=NULL; 112 112 f=sc_file_new(); 113 113 if (!f){ … … 429 429 drvdata->nfiles=-1; 430 430 free(drvdata->filelist); 431 drvdata->filelist= 0;431 drvdata->filelist=NULL; 432 432 } 433 433 if(file->sec_attr_len >=3) { … … 460 460 drvdata->nfiles=0; 461 461 free(drvdata->filelist); 462 drvdata->filelist= 0;462 drvdata->filelist=NULL; 463 463 } 464 464 /* the format of the poprietary attributes is: -
trunk/src/libopensc/card-mcrd.c
r3142 r3177 1057 1057 } 1058 1058 1059 int select_key_df(sc_card_t * card)1059 static int select_key_df(sc_card_t * card) 1060 1060 { 1061 1061 int r; -
trunk/src/libopensc/card-oberthur.c
r3169 r3177 87 87 88 88 89 const unsigned char *aidAuthentIC_V5 =89 static const unsigned char *aidAuthentIC_V5 = 90 90 (const u8 *)"\xA0\x00\x00\x00\x77\x01\x03\x03\x00\x00\x00\xF1\x00\x00\x00\x02"; 91 const int lenAidAuthentIC_V5 = 16;92 const char *nameAidAuthentIC_V5 = "AuthentIC v5";91 static const int lenAidAuthentIC_V5 = 16; 92 static const char *nameAidAuthentIC_V5 = "AuthentIC v5"; 93 93 94 94 #define AUTH_PIN 1 … … 144 144 #endif 145 145 146 void _auth_print_acls(struct sc_card *card, struct sc_file *file)146 static void _auth_print_acls(struct sc_card *card, struct sc_file *file) 147 147 { 148 148 int ii, jj; -
trunk/src/libopensc/card.c
r3108 r3177 653 653 } 654 654 655 in line int sc_card_valid(const sc_card_t *card) {655 int sc_card_valid(const sc_card_t *card) { 656 656 #ifndef NDEBUG 657 657 assert(card != NULL); -
trunk/src/libopensc/muscle-filesystem.c
r3069 r3177 38 38 }; 39 39 40 mscfs_t *mscfs_new( ) {40 mscfs_t *mscfs_new(void) { 41 41 mscfs_t *fs = (mscfs_t*)malloc(sizeof(mscfs_t)); 42 42 memset(fs, 0, sizeof(mscfs_t)); -
trunk/src/libopensc/opensc.h
r3155 r3177 40 40 #include <opensc/errors.h> 41 41 #include <opensc/types.h> 42 43 #ifndef __GNUC__44 #undef inline45 #define inline46 #endif47 42 48 43 /* Different APDU cases */ … … 777 772 * @param card The card object to check 778 773 */ 779 in line int sc_card_valid(const sc_card_t *card);774 int sc_card_valid(const sc_card_t *card); 780 775 781 776 /** … … 1002 997 int sc_card_ctl(sc_card_t *card, unsigned long command, void *arg); 1003 998 1004 in line int sc_file_valid(const sc_file_t *file);999 int sc_file_valid(const sc_file_t *file); 1005 1000 sc_file_t * sc_file_new(void); 1006 1001 void sc_file_free(sc_file_t *file); -
trunk/src/libopensc/pkcs15-prkey.c
r3084 r3177 205 205 case SC_PKCS15_TYPE_PRKEY_DSA: 206 206 sc_format_asn1_entry(asn1_prkey + 1, &dsa_prkey_obj, NULL, 1); 207 sc_format_asn1_entry(asn1_prk_dsa_attr + 0, asn1_dsakey_value_attr, 0, 1);207 sc_format_asn1_entry(asn1_prk_dsa_attr + 0, asn1_dsakey_value_attr, NULL, 1); 208 208 if (prkey->path.type != SC_PATH_TYPE_PATH_PROT) { 209 209 /* indirect: just add the path */ -
trunk/src/libopensc/pkcs15-syn.c
r3099 r3177 66 66 { "atrust-acos",sc_pkcs15emu_atrust_acos_init_ex}, 67 67 { "tccardos", sc_pkcs15emu_tccardos_init_ex }, 68 { NULL, 0}68 { NULL, NULL } 69 69 }; 70 70 -
trunk/src/libopensc/pkcs15.c
r3099 r3177 404 404 } 405 405 406 struct sc_pkcs15_card * sc_pkcs15_card_new( )406 struct sc_pkcs15_card * sc_pkcs15_card_new(void) 407 407 { 408 408 struct sc_pkcs15_card *p15card; -
trunk/src/libopensc/reader-openct.c
r3062 r3177 160 160 * deallocate the private data and any resources. 161 161 */ 162 int 163 openct_reader_finish(sc_context_t *ctx, void *priv_data) 162 static int openct_reader_finish(sc_context_t *ctx, void *priv_data) 164 163 { 165 164 SC_FUNC_CALLED(ctx, 1); … … 172 171 * freed by OpenSC. 173 172 */ 174 int 175 openct_reader_release(sc_reader_t *reader) 173 static int openct_reader_release(sc_reader_t *reader) 176 174 { 177 175 struct driver_data *data = (struct driver_data *) reader->drv_data; … … 198 196 * Check whether a card was added/removed 199 197 */ 200 int 201 openct_reader_detect_card_presence(sc_reader_t *reader, 198 static int openct_reader_detect_card_presence(sc_reader_t *reader, 202 199 sc_slot_info_t *slot) 203 200 { … … 272 269 } 273 270 274 int 275 openct_reader_disconnect(sc_reader_t *reader, 276 sc_slot_info_t *slot) 271 static int openct_reader_disconnect(sc_reader_t *reader, sc_slot_info_t *slot) 277 272 { 278 273 struct driver_data *data = (struct driver_data *) reader->drv_data; … … 357 352 } 358 353 359 360 int 361 openct_reader_perform_verify(sc_reader_t *reader, 362 sc_slot_info_t *slot, 363 struct sc_pin_cmd_data *info) 354 static int openct_reader_perform_verify(sc_reader_t *reader, 355 sc_slot_info_t *slot, struct sc_pin_cmd_data *info) 364 356 { 365 357 struct driver_data *data = (struct driver_data *) reader->drv_data; … … 420 412 } 421 413 422 423 int 424 openct_reader_lock(sc_reader_t *reader, 425 sc_slot_info_t *slot) 414 static int openct_reader_lock(sc_reader_t *reader, sc_slot_info_t *slot) 426 415 { 427 416 struct driver_data *data = (struct driver_data *) reader->drv_data; … … 448 437 } 449 438 450 int 451 openct_reader_unlock(sc_reader_t *reader, 452 sc_slot_info_t *slot) 439 static int openct_reader_unlock(sc_reader_t *reader, sc_slot_info_t *slot) 453 440 { 454 441 struct driver_data *data = (struct driver_data *) reader->drv_data; … … 474 461 * Handle an error code returned by OpenCT 475 462 */ 476 int 477 openct_error(sc_reader_t *reader, int code) 463 static int openct_error(sc_reader_t *reader, int code) 478 464 { 479 465 if (code >= 0) -
trunk/src/libopensc/sc.c
r3114 r3177 35 35 36 36 #ifdef VERSION 37 const char *sc_version = VERSION;37 static const char *sc_version = VERSION; 38 38 #else 39 const char *sc_version = "(undef)";39 static const char *sc_version = "(undef)"; 40 40 #endif 41 41 … … 477 477 } 478 478 479 sc_file_t * sc_file_new( )479 sc_file_t * sc_file_new(void) 480 480 { 481 481 sc_file_t *file = (sc_file_t *)calloc(1, sizeof(sc_file_t)); … … 633 633 } 634 634 635 in line int sc_file_valid(const sc_file_t *file) {635 int sc_file_valid(const sc_file_t *file) { 636 636 #ifndef NDEBUG 637 637 assert(file != NULL); -
trunk/src/libopensc/ui.c
r2923 r3177 158 158 * to the default function 159 159 */ 160 int 161 sc_ui_get_func(sc_context_t *ctx, const char *name, void **ret) 160 static int sc_ui_get_func(sc_context_t *ctx, const char *name, void **ret) 162 161 { 163 162 *ret = NULL; … … 201 200 * Default ui functions 202 201 */ 203 int 204 sc_ui_get_pin_default(sc_ui_hints_t *hints, char **out) 202 static int sc_ui_get_pin_default(sc_ui_hints_t *hints, char **out) 205 203 { 206 204 sc_context_t *ctx = hints->card->ctx; … … 234 232 } 235 233 236 int 237 sc_ui_get_pin_pair_default(sc_ui_hints_t *hints, char **old_out,char **new_out)234 static int sc_ui_get_pin_pair_default(sc_ui_hints_t *hints, char **old_out, 235 char **new_out) 238 236 { 239 237 sc_context_t *ctx = hints->card->ctx; … … 279 277 } 280 278 281 int 282 __sc_ui_read_pin(sc_context_t *ctx, const char *prompt, 279 static int __sc_ui_read_pin(sc_context_t *ctx, const char *prompt, 283 280 const char *label, int flags, 284 281 sc_pkcs15_pin_info_t *pin_info, … … 425 422 } 426 423 427 int 428 sc_ui_display_error_default(sc_context_t *ctx, const char *msg) 424 static int sc_ui_display_error_default(sc_context_t *ctx, const char *msg) 429 425 { 430 426 return sc_ui_display_msg(ctx, SC_LOG_TYPE_ERROR, msg); 431 427 } 432 428 433 int 434 sc_ui_display_debug_default(sc_context_t *ctx, const char *msg) 429 static int sc_ui_display_debug_default(sc_context_t *ctx, const char *msg) 435 430 { 436 431 return sc_ui_display_msg(ctx, SC_LOG_TYPE_DEBUG, msg); -
trunk/src/scconf/test-conf.c
r2925 r3177 87 87 } 88 88 89 int write_entries(scconf_context *conf, scconf_list *list)89 static int write_entries(scconf_context *conf, scconf_list *list) 90 90 { 91 91 static int int42 = 42, int1 = 1;
