Differences From Artifact [7200c62d18]:
- File test.c — part of check-in [ab28e9b926] at 2011-08-26 03:59:20 on branch trunk — Updated to support linking to PKCS#11 providers that export the minimal PKCS#11 symbols (user: rkeene, size: 21938) [annotate] [blame] [check-ins using]
To Artifact [7438606333]:
- File
test.c
— part of check-in
[5027cbae9b]
at
2011-08-26 05:29:43
on branch trunk
— Updated to include DoD root CAs as objects in the PKCS#11 module
Updated to include Netscape Trust Objects (https://developer.mozilla.org/index.php?title=en/NSS/PKCS_%2311_Netscape_Trust) in PKCS#11 module
Added more attributes to scan for to test driver (user: rkeene, size: 23112) [annotate] [blame] [check-ins using]
︙ | |||
65 66 67 68 69 70 71 72 73 74 75 76 77 78 | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | + + | case 0x00000180: return "CKA_EC_PARAMS"; case 0x00000181: return "CKA_EC_POINT"; case 0x00000200: return "CKA_SECONDARY_AUTH"; case 0x00000201: return "CKA_AUTH_PIN_FLAGS"; case 0x00000300: return "CKA_HW_FEATURE_TYPE"; case 0x00000301: return "CKA_RESET_ON_INIT"; case 0x00000302: return "CKA_HAS_RESET"; case 0xce5363b4: return "CKA_CERT_SHA1_HASH"; case 0xce5363b5: return "CKA_CERT_MD5_HASH"; } snprintf(retbuf, sizeof(retbuf), "0x%08lx", (unsigned long) attrib); retbuf[sizeof(retbuf) - 1] = '\0'; return(retbuf); } |
︙ | |||
114 115 116 117 118 119 120 | 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - - + + + + + + + + + + + + + + + - | {CKA_TOKEN, NULL, 0}, {CKA_LABEL, NULL, 0}, {CKA_PRIVATE, NULL, 0}, {CKA_ID, NULL, 0}, {CKA_SERIAL_NUMBER, NULL, 0}, {CKA_SUBJECT, NULL, 0}, {CKA_ISSUER, NULL, 0}, |
︙ | |||
438 439 440 441 442 443 444 445 446 447 448 449 450 451 | 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 | + + + + | case CKA_ID: case CKA_SERIAL_NUMBER: case CKA_PRIVATE: case CKA_CERTIFICATE_TYPE: case CKA_KEY_TYPE: case CKA_SIGN: case CKA_DECRYPT: case CKA_TRUSTED: case CKA_CERT_MD5_HASH: case CKA_CERT_SHA1_HASH: pucValue = curr_attr->pValue; printf(" [%lu] %20s: ", hObject, pkcs11_attribute_to_name(curr_attr->type)); for (byte_idx = 0; byte_idx < curr_attr->ulValueLen; byte_idx++) { printf("%02x ", (unsigned int) pucValue[byte_idx]); } |
︙ | |||
461 462 463 464 465 466 467 468 469 470 471 472 473 474 | 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 | + + + + + + + + + + + + | for (byte_idx = 0; byte_idx < curr_attr->ulValueLen; byte_idx++) { printf("\\x%02x", (unsigned int) pucValue[byte_idx]); } printf(" ;; %p/%lu\n", curr_attr->pValue, curr_attr->ulValueLen); break; case CKA_TRUST_CLIENT_AUTH: case CKA_TRUST_CODE_SIGNING: case CKA_TRUST_CRL_SIGN: case CKA_TRUST_DATA_ENCIPHERMENT: case CKA_TRUST_DIGITAL_SIGNATURE: case CKA_TRUST_EMAIL_PROTECTION: case CKA_TRUST_KEY_AGREEMENT: case CKA_TRUST_KEY_CERT_SIGN: case CKA_TRUST_KEY_ENCIPHERMENT: case CKA_TRUST_NON_REPUDIATION: case CKA_TRUST_SERVER_AUTH: break; default: printf(" [%lu] %20s: %p/%lu\n", hObject, pkcs11_attribute_to_name(curr_attr->type), curr_attr->pValue, curr_attr->ulValueLen); break; } } else { |
︙ |