Changeset 3510
- Timestamp:
- 05/05/08 15:00:01 (4 months ago)
- Location:
- trunk/src
- Files:
-
- 14 modified
-
libopensc/muscle-filesystem.h (modified) (1 diff)
-
libopensc/muscle.c (modified) (4 diffs)
-
pkcs11/framework-pkcs15.c (modified) (1 diff)
-
pkcs11/openssl.c (modified) (1 diff)
-
pkcs11/pkcs11-display.c (modified) (2 diffs)
-
scconf/parse.c (modified) (1 diff)
-
scconf/sclex.c (modified) (1 diff)
-
signer/dialog.c (modified) (2 diffs)
-
signer/opensc-crypto.h (modified) (1 diff)
-
tests/print.c (modified) (4 diffs)
-
tests/sc-test.h (modified) (1 diff)
-
tools/opensc-explorer.c (modified) (3 diffs)
-
tools/piv-tool.c (modified) (1 diff)
-
tools/pkcs15-init.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libopensc/muscle-filesystem.h
r3080 r3510 52 52 } mscfs_t; 53 53 54 mscfs_t *mscfs_new( );54 mscfs_t *mscfs_new(void); 55 55 void mscfs_free(mscfs_t *fs); 56 56 void mscfs_clear_cache(mscfs_t* fs); -
trunk/src/libopensc/muscle.c
r3148 r3510 317 317 { 318 318 assert(buffer); 319 assert(bufferLength >= pinLength);319 assert(bufferLength >= (size_t)pinLength); 320 320 assert(pinLength <= MSC_MAX_PIN_LENGTH); 321 321 … … 361 361 { 362 362 assert(buffer); 363 assert(bufferLength >= pukLength);363 assert(bufferLength >= (size_t)pukLength); 364 364 assert(pukLength <= MSC_MAX_PIN_LENGTH); 365 365 … … 407 407 assert(newPinLength <= MSC_MAX_PIN_LENGTH); 408 408 assert(buffer); 409 assert(bufferLength >= pinLength + newPinLength + 2 );409 assert(bufferLength >= pinLength + newPinLength + 2UL); 410 410 411 411 truncatePinNulls(pinValue, &pinLength); … … 807 807 size_t outputDataLength) 808 808 { 809 int left = dataLength;809 size_t left = dataLength; 810 810 const u8* inPtr = data; 811 811 u8* outPtr = outputData; -
trunk/src/pkcs11/framework-pkcs15.c
r3439 r3510 264 264 { 265 265 int found = 0; 266 int ii=0;266 unsigned int ii=0; 267 267 268 268 while(ii<num_objects && !found) { -
trunk/src/pkcs11/openssl.c
r3405 r3510 137 137 { 138 138 EVP_MD_CTX *md_ctx = DIGEST_CTX(op); 139 unsigned intlen = *pulDigestLen;140 141 if (len < EVP_MD_CTX_size(md_ctx)) {139 CK_ULONG len = *pulDigestLen; 140 141 if (len < (CK_ULONG)EVP_MD_CTX_size(md_ctx)) { 142 142 *pulDigestLen = EVP_MD_CTX_size(md_ctx); 143 143 return CKR_BUFFER_TOO_SMALL; -
trunk/src/pkcs11/pkcs11-display.c
r3405 r3510 714 714 void print_slot_info(FILE *f, CK_SLOT_INFO *info) 715 715 { 716 inti;716 size_t i; 717 717 enum_specs ck_flags[] = { 718 718 { CKF_TOKEN_PRESENT , "CKF_TOKEN_PRESENT " }, … … 900 900 void print_session_info(FILE *f, CK_SESSION_INFO *info) 901 901 { 902 inti;902 size_t i; 903 903 enum_specs ck_flags[] = { 904 904 { CKF_RW_SESSION , "CKF_RW_SESSION " }, -
trunk/src/scconf/parse.c
r3405 r3510 151 151 switch (parser.current_item->type) { 152 152 case SCCONF_ITEM_TYPE_COMMENT: 153 parser.current_item->value.comment = strdup((c har *) data);153 parser.current_item->value.comment = strdup((const char *) data); 154 154 break; 155 155 case SCCONF_ITEM_TYPE_BLOCK: -
trunk/src/scconf/sclex.c
r1686 r3510 93 93 } 94 94 95 static void buf_eat_till(BUFHAN * bp, char start, c har *end)95 static void buf_eat_till(BUFHAN * bp, char start, const char *end) 96 96 { 97 97 int i; -
trunk/src/signer/dialog.c
r3183 r3510 37 37 { 38 38 int r; 39 size_t len; 39 40 const char *argv[3]; 40 41 const char *pgmname = PIN_ENTRY; … … 79 80 goto err; 80 81 } 81 r= strlen(buf);82 if ( r< pinfo->min_length) {82 len = strlen(buf); 83 if (len < pinfo->min_length) { 83 84 sprintf(errtext, "PIN code too short, min. %lu digits", (unsigned long) pinfo->min_length); 84 85 continue; 85 86 } 86 if ( r> pinfo->max_length) {87 if (len > pinfo->max_length) { 87 88 sprintf(errtext, "PIN code too long, max. %lu digits", (unsigned long) pinfo->max_length); 88 89 continue; -
trunk/src/signer/opensc-crypto.h
r459 r3510 14 14 }; 15 15 16 extern RSA_METHOD * sc_get_method( );16 extern RSA_METHOD * sc_get_method(void); 17 17 18 18 #endif -
trunk/src/tests/print.c
r3183 r3510 96 96 { 97 97 int i; 98 size_t j; 98 99 const char *usages[] = 99 100 { … … 132 133 if (prkey->path.len) { 133 134 printf("\tPath : "); 134 for ( i = 0; i < prkey->path.len; i++)135 printf("%02X", prkey->path.value[ i]);135 for (j = 0; j < prkey->path.len; j++) 136 printf("%02X", prkey->path.value[j]); 136 137 if (prkey->path.type == SC_PATH_TYPE_PATH_PROT) 137 138 printf(" (protected)"); … … 144 145 { 145 146 int i; 147 size_t j; 146 148 const char *usages[] = 147 149 { … … 179 181 printf("\tNative : %s\n", pubkey->native ? "yes" : "no"); 180 182 printf("\tPath : "); 181 for ( i = 0; i < pubkey->path.len; i++)182 printf("%02X", pubkey->path.value[ i]);183 for (j = 0; j < pubkey->path.len; j++) 184 printf("%02X", pubkey->path.value[j]); 183 185 printf("\n"); 184 186 printf("\tID : %s\n", sc_pkcs15_print_id(&pubkey->id)); -
trunk/src/tests/sc-test.h
r3182 r3510 14 14 15 15 int sc_test_init(int *argc, char *argv[]); 16 void sc_test_cleanup( );16 void sc_test_cleanup(void); 17 17 void sc_test_print_card(const sc_pkcs15_card_t *); 18 18 void sc_test_print_object(const struct sc_pkcs15_object *); -
trunk/src/tools/opensc-explorer.c
r3405 r3510 130 130 } else { 131 131 /* file id */ 132 int buf[2];132 unsigned int buf[2]; 133 133 u8 cbuf[2]; 134 134 … … 535 535 goto usage; 536 536 /* %z isn't supported everywhere */ 537 if (sscanf(argv[1], "% d", &size) != 1)537 if (sscanf(argv[1], "%u", &size) != 1) 538 538 goto usage; 539 539 file = sc_file_new(); … … 565 565 if (arg_to_path(argv[0], &path, 1) != 0) 566 566 goto usage; 567 if (sscanf(argv[1], "% d", &size) != 1)567 if (sscanf(argv[1], "%u", &size) != 1) 568 568 goto usage; 569 569 file = sc_file_new(); -
trunk/src/tools/piv-tool.c
r3405 r3510 122 122 der = malloc(derlen); 123 123 if (der == NULL) { 124 printf("file %s is too big, %d\n", cert_file, derlen); 124 printf("file %s is too big, %lu\n", 125 cert_file, (unsigned long)derlen); 125 126 return-1 ; 126 127 } -
trunk/src/tools/pkcs15-init.c
r3405 r3510 108 108 static void read_options_file(const char *); 109 109 static void ossl_print_errors(void); 110 static void set_userpin_ref( );110 static void set_userpin_ref(void); 111 111 112 112
