Overview
Comment: | Updated PC/SC identity member of cackey identity name to be more descriptive
Added more sanity checks Updated to populate pcsc_identity structure of cackey identity from certificate information |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
26acceb6f2061800f15ba4ef9201cb04 |
User & Date: | rkeene on 2010-05-17 07:19:02 |
Other Links: | manifest | tags |
Context
2010-05-17
| ||
14:44 | Updated version-script detection macro check-in: 3dee1a5953 user: rkeene tags: trunk | |
07:19 |
Updated PC/SC identity member of cackey identity name to be more descriptive
Added more sanity checks Updated to populate pcsc_identity structure of cackey identity from certificate information check-in: 26acceb6f2 user: rkeene tags: trunk | |
06:00 | Added missing file from last commit check-in: 70222fd9bf user: rkeene tags: trunk | |
Changes
Modified cackey.c from [ddbf6476ef] to [9bef8e6303].
︙ | |||
464 465 466 467 468 469 470 | 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | - + | unsigned char *label; size_t certificate_len; unsigned char *certificate; }; struct cackey_identity { |
︙ | |||
1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 | 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 | + + + + + + + + + + + + - - + + - + | } if (outbuf == NULL) { CACKEY_DEBUG_PRINTF("Error. outbuf is NULL"); return(-1); } if (identity == NULL) { CACKEY_DEBUG_PRINTF("Error. identity is NULL"); return(-1); } if (identity->pcsc_identity == NULL) { CACKEY_DEBUG_PRINTF("Error. identity->pcsc_identity is NULL"); return(-1); } /* Begin transaction */ cackey_begin_transaction(slot); /* Select correct applet */ |
︙ | |||
2514 2515 2516 2517 2518 2519 2520 | 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 | + - + + + + | curr_attr = &identities[id_idx].attributes[attr_idx]; if (curr_attr->pValue) { free(curr_attr->pValue); } } if (identities[id_idx].attributes) { |
︙ | |||
2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 | 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 | + + + + + + | for (curr_id_type = CKO_CERTIFICATE; curr_id_type <= CKO_PRIVATE_KEY; curr_id_type++) { identities[id_idx].attributes = cackey_get_attributes(curr_id_type, &pcsc_identities[cert_idx], cert_idx, &identities[id_idx].attributes_count); if (identities[id_idx].attributes == NULL) { identities[id_idx].attributes_count = 0; } identities[id_idx].pcsc_identity = malloc(sizeof(*identities[id_idx].pcsc_identity)); memcpy(identities[id_idx].pcsc_identity, &pcsc_identities[cert_idx], sizeof(*identities[id_idx].pcsc_identity)); identities[id_idx].pcsc_identity->certificate = malloc(pcsc_identities[cert_idx].certificate_len); memcpy(identities[id_idx].pcsc_identity->certificate, pcsc_identities[cert_idx].certificate, pcsc_identities[cert_idx].certificate_len); id_idx++; } } cackey_free_certs(pcsc_identities, num_certs, 1); *ids_found = num_ids; |
︙ | |||
4602 4603 4604 4605 4606 4607 4608 | 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 | - + | cackey_sessions[hSession].sign_mechanism = pMechanism->mechanism; cackey_sessions[hSession].sign_buflen = 128; cackey_sessions[hSession].sign_bufused = 0; cackey_sessions[hSession].sign_buf = malloc(sizeof(*cackey_sessions[hSession].sign_buf) * cackey_sessions[hSession].sign_buflen); |
︙ |