Changeset 3502

Show
Ignore:
Timestamp:
04/28/08 09:57:03 (4 months ago)
Author:
ludovic.rousseau
Message:

convert C++ in C comment

Location:
trunk/src/libopensc
Files:
12 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/libopensc/card-akis.c

    r3278 r3502  
    336336{ 
    337337        if (data->cmd == SC_PIN_CMD_VERIFY) { 
    338                 // ISO7816 implementation works 
     338                /* ISO7816 implementation works */ 
    339339                return iso_ops->pin_cmd(card, data, tries_left); 
    340340        } 
    341341 
    342342        if (data->cmd == SC_PIN_CMD_CHANGE) { 
    343                 // This is AKIS specific 
     343                /* This is AKIS specific */ 
    344344                int r; 
    345345                sc_apdu_t apdu; 
     
    527527        akis_ops.match_card = akis_match_card; 
    528528        akis_ops.init = akis_init; 
    529         // read_binary: ISO7816 implementation works 
    530         // write_binary: ISO7816 implementation works 
    531         // update_binary: ISO7816 implementation works 
    532         // erase_binary: Untested 
    533         // read_record: Untested 
    534         // write_record: Untested 
    535         // append_record: Untested 
    536         // update_record: Untested 
     529        /* read_binary: ISO7816 implementation works */ 
     530        /* write_binary: ISO7816 implementation works */ 
     531        /* update_binary: ISO7816 implementation works */ 
     532        /* erase_binary: Untested */ 
     533        /* read_record: Untested */ 
     534        /* write_record: Untested */ 
     535        /* append_record: Untested */ 
     536        /* update_record: Untested */ 
    537537        akis_ops.select_file = akis_select_file; 
    538         // get_response: ISO7816 implementation works 
    539         // get_challenge: ISO7816 implementation works 
     538        /* get_response: ISO7816 implementation works */ 
     539        /* get_challenge: ISO7816 implementation works */ 
    540540        akis_ops.logout = akis_logout; 
    541         // restore_security_env: Untested 
     541        /* restore_security_env: Untested */ 
    542542        akis_ops.set_security_env = akis_set_security_env; 
    543         // decipher: Untested 
    544         // compute_signature: ISO7816 implementation works 
     543        /* decipher: Untested */ 
     544        /* compute_signature: ISO7816 implementation works */ 
    545545        akis_ops.create_file = akis_create_file; 
    546546        akis_ops.delete_file = akis_delete_file; 
    547547        akis_ops.list_files = akis_list_files; 
    548         // check_sw: ISO7816 implementation works 
     548        /* check_sw: ISO7816 implementation works */ 
    549549        akis_ops.card_ctl = akis_card_ctl; 
    550550        akis_ops.process_fci = akis_process_fci; 
    551         // construct_fci: Not needed 
     551        /* construct_fci: Not needed */ 
    552552        akis_ops.pin_cmd = akis_pin_cmd; 
    553553        akis_ops.get_data = akis_get_data; 
    554         // put_data: Not implemented 
    555         // delete_record: Not implemented 
     554        /* put_data: Not implemented */ 
     555        /* delete_record: Not implemented */ 
    556556 
    557557        return &akis_drv; 
  • trunk/src/libopensc/card-asepcos.c

    r3277 r3502  
    185185                        if (r != SC_SUCCESS) 
    186186                                return r; 
    187                         tlen += 2 + p[4]; // FIXME 
     187                        tlen += 2 + p[4]; /* FIXME */ 
    188188                } else if (p[3] == 0xAF && len >= 4U + p[4]) { 
    189189                        /* TODO: support AND expressions */ 
     
    191191                        if (r != SC_SUCCESS) 
    192192                                return r; 
    193                         tlen += 2 + p[4];       // FIXME 
     193                        tlen += 2 + p[4];       /* FIXME */ 
    194194                } else { 
    195195                        sc_error(card->ctx, "invalid security condition"); 
  • trunk/src/libopensc/card-atrust-acos.c

    r3318 r3502  
    4040}; 
    4141 
    42 // sequence and number has to match atr table ! 
     42/* sequence and number has to match atr table ! */ 
    4343static const char *atrust_acos_names[] = { 
    4444  ACOS_EMV_A03, 
     
    8181                if (sc_hex_to_bin(atrp, defatr, &len)) 
    8282                        continue; 
    83                 // we may only verify part of ATR since 
    84                 // part of the hist chars is variable 
     83                /* we may only verify part of ATR since */ 
     84                /* part of the hist chars is variable */ 
    8585                if (len > card->atr_len) 
    8686                        continue; 
     
    156156        if (buflen < 2) 
    157157                return SC_ERROR_INTERNAL; 
    158         if (buf[0] != 0x6f)                                     // FCI template 
     158        if (buf[0] != 0x6f)                                     /* FCI template */ 
    159159                return SC_ERROR_INVALID_DATA; 
    160160        len = (size_t)buf[1]; 
     
    170170        file->size = 0; 
    171171   
    172         // get file size 
     172        /* get file size */ 
    173173        tag = sc_asn1_find_tag(ctx, p, len, 0x80, &taglen); 
    174174        if (tag != NULL && taglen >= 2) { 
     
    179179        } 
    180180 
    181         // get file type 
     181        /* get file type */ 
    182182        tag = sc_asn1_find_tag(ctx, p, len, 0x82, &taglen); 
    183183        if (tag != NULL) { 
     
    822822        } 
    823823   
    824         // iso error  
     824        /* iso error */ 
    825825        return iso_ops->check_sw(card, sw1, sw2); 
    826826} 
  • trunk/src/libopensc/card-incrypto34.c

    r3177 r3502  
    196196        SC_TEST_RET(card->ctx, r, "APDU transmit failed"); 
    197197        if (apdu.sw1 == 0x6a && apdu.sw2 == 0x82) 
    198                 goto end; // no more files 
     198                goto end; /* no more files */ 
    199199 
    200200        r = sc_check_sw(card, apdu.sw1, apdu.sw2); 
  • trunk/src/libopensc/card-muscle.c

    r3180 r3502  
    179179        file = &fs->cache.array[fs->currentFileIndex]; 
    180180        objectId = file->objectId; 
    181 //      memcpy(objectId.id, file->objectId.id, 4); 
     181        /* memcpy(objectId.id, file->objectId.id, 4); */ 
    182182        if(!file->ef) { 
    183183                oid[0] = oid[2]; 
     
    202202         
    203203        objectId = file->objectId; 
    204         //memcpy(objectId.id, file->objectId.id, 4); 
     204        /* memcpy(objectId.id, file->objectId.id, 4); */ 
    205205        if(!file->ef) { 
    206206                oid[0] = oid[2]; 
     
    230230                r = msc_update_object(card, objectId, idx, buf, count); 
    231231        } 
    232         //mscfs_clear_cache(fs); 
     232        /* mscfs_clear_cache(fs); */ 
    233233        return r; 
    234234} 
     
    269269                oid[1] = oid[3]; 
    270270                oid[2] = oid[3] = 0; 
    271                 // ??? objectId = objectId >> 16; 
     271                /* ??? objectId = objectId >> 16; */ 
    272272        } 
    273273        if((0 == memcmp(oid, "\x3F\x00\x00\x00", 4)) 
     
    308308{ 
    309309        int key; 
    310         // Everybody by default.... 
     310        /* Everybody by default.... */ 
    311311        sc_file_add_acl_entry(file, operation, SC_AC_NONE, 0); 
    312312        if(acl == 0xFFFF) { 
     
    585585        /* CURRENTLY DONT SUPPOT EXTRACTING PRIVATE KEYS... */ 
    586586        switch(info->keyType) { 
    587         case 1: // RSA 
     587        case 1: /* RSA */ 
    588588                return msc_extract_rsa_public_key(card,  
    589589                        info->keyLocation,  
     
    601601        /* CURRENTLY DONT SUPPOT EXTRACTING PRIVATE KEYS... */ 
    602602        switch(info->keyType) { 
    603         case 0x02: // RSA_PRIVATE 
    604         case 0x03: // RSA_PRIVATE_CRT 
     603        case 0x02: /* RSA_PRIVATE */ 
     604        case 0x03: /* RSA_PRIVATE_CRT */ 
    605605                return msc_import_key(card,  
    606606                        info->keyLocation,  
     
    676676                return SC_ERROR_NOT_SUPPORTED; 
    677677        } 
    678         //if (env->flags & SC_SEC_ENV_FILE_REF_PRESENT) 
    679         //      if (memcmp(env->file_ref.value, "\x00\x12", 2) != 0) { 
    680         //              sc_error(card->ctx, "File reference is not 0012.\n"); 
    681         //              return SC_ERROR_NOT_SUPPORTED; 
    682         //      } 
     678        /* if (env->flags & SC_SEC_ENV_FILE_REF_PRESENT) 
     679                if (memcmp(env->file_ref.value, "\x00\x12", 2) != 0) { 
     680                        sc_error(card->ctx, "File reference is not 0012.\n"); 
     681                        return SC_ERROR_NOT_SUPPORTED; 
     682                } */ 
    683683        priv->env = *env; 
    684684        return 0; 
  • trunk/src/libopensc/card-oberthur.c

    r3405 r3502  
    182182        sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0xA4, 0x04, 0x0C); 
    183183        apdu.lc = sizeof(cm); 
    184 //      apdu.le = sizeof(cm)+4; 
     184        /* apdu.le = sizeof(cm)+4; */ 
    185185        apdu.le = 0; 
    186186        apdu.data = cm; 
     
    20582058                        auth_current_ef->magic, auth_current_ef->ef_structure); 
    20592059 
    2060 //      _auth_print_acls(card, auth_current_ef); 
     2060/*      _auth_print_acls(card, auth_current_ef); */ 
    20612061 
    20622062#ifndef NOT_YET  
  • trunk/src/libopensc/card-piv.c

    r3405 r3502  
    17171717        priv->selected_obj = -1; 
    17181718        priv->max_recv_size = 256; 
    1719         //priv->max_recv_size = card->max_recv_size; 
     1719        /* priv->max_recv_size = card->max_recv_size; */ 
    17201720        priv->max_send_size = card->max_send_size; 
    17211721        card->max_recv_size = 0xffff; /* must force pkcs15 read_binary in one call */ 
  • trunk/src/libopensc/card-tcos.c

    r3309 r3502  
    521521                else sc_debug(ctx, "Key-Reference %02X (len=%d)\n", env->key_ref[0], env->key_ref_len); 
    522522        } 
    523         // Key-Reference 0x80 ?? 
     523        /* Key-Reference 0x80 ?? */ 
    524524        default_key= !(env->flags & SC_SEC_ENV_KEY_REF_PRESENT) || (env->key_ref_len==1 && env->key_ref[0]==0x80); 
    525525        if(ctx->debug>=3){ 
  • trunk/src/libopensc/p15card-helper.c

    r3405 r3502  
    133133} 
    134134 
    135 //int default_cert_handle(sc_pkcs15_card_t *p15card, p15data_items* items, cdata* cert, u8* data, size_t length) { 
     135/* int default_cert_handle(sc_pkcs15_card_t *p15card, p15data_items* items, cdata* cert, u8* data, size_t length) { */ 
    136136CERT_HANDLE_FUNCTION(default_cert_handle) { 
    137137        /* Certificate data exists, parse it */ 
     
    171171         
    172172        modulus_len = 8 * BN_num_bytes(pkey->pkey.rsa->n); /* converting to bits */ 
    173         //printf("Key Size: %d bits\n\n", modulus_len); 
    174         //cached_cert->modulusLength = modulus_len; 
     173        /* printf("Key Size: %d bits\n\n", modulus_len); */ 
     174        /* cached_cert->modulusLength = modulus_len; */ 
    175175         
    176176        if(key->label) { 
  • trunk/src/libopensc/pkcs15-gemsafeV1.c

    r3430 r3502  
    494494#endif 
    495495 
    496 //SC_IMPLEMENT_DRIVER_VERSION("0.9.4") 
     496/* SC_IMPLEMENT_DRIVER_VERSION("0.9.4") */ 
  • trunk/src/libopensc/pkcs15-tcos.c

    r3405 r3502  
    6565        } 
    6666 
    67         // some certificates are prefixed by an OID 
     67        /* some certificates are prefixed by an OID */ 
    6868        if(cert[4]==0x06 && cert[5]<10 && cert[6+cert[5]]==0x30 && cert[7+cert[5]]==0x82){ 
    6969                cert_info.path.index=6+cert[5]; 
     
    255255        char dir[10], *c_auth; 
    256256 
    257         // NKS-Applikation ? 
     257        /* NKS-Applikation ? */ 
    258258        p.len=7; p.type=SC_PATH_TYPE_DF_NAME; 
    259259        memcpy(p.value, "\xD2\x76\x00\x00\x03\x01\x02", p.len=7); 
     
    307307        ); 
    308308 
    309         // SigG-Applikation ? 
     309        /* SigG-Applikation ? */ 
    310310        p.len=7; p.type=SC_PATH_TYPE_DF_NAME; 
    311311        memcpy(p.value, "\xD2\x76\x00\x00\x66\x01", p.len=6); 
     
    438438        int i, r; 
    439439 
    440         // check if we have the correct card OS unless SC_PKCS15EMU_FLAGS_NO_CHECK 
     440        /* check if we have the correct card OS unless SC_PKCS15EMU_FLAGS_NO_CHECK */ 
    441441        i=(opts && (opts->flags & SC_PKCS15EMU_FLAGS_NO_CHECK)); 
    442442        if (!i && card->type!=SC_CARD_TYPE_TCOS_V2 && card->type!=SC_CARD_TYPE_TCOS_V3) return SC_ERROR_WRONG_CARD; 
    443443 
    444         // get the card serial number 
     444        /* get the card serial number */ 
    445445        r = sc_card_ctl(card, SC_CARDCTL_GET_SERIALNR, &serialnr); 
    446446        if (r < 0) { 
  • trunk/src/libopensc/reader-pcsc.c

    r3455 r3502  
    12061206 
    12071207        SC_TEST_RET(reader->ctx, r, "Part 10: block transmit failed!"); 
    1208         // finish the call if it was a two-phase operation 
     1208        /* finish the call if it was a two-phase operation */ 
    12091209        if ((ioctl == pslot->verify_ioctl_start) 
    12101210            || (ioctl == pslot->modify_ioctl_start)) {