Check-in [5534d640e4]
Overview
Comment:Updated to determine subject from certificate
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5534d640e4905708adef5361fc99bebad375bcdb
User & Date: rkeene on 2010-05-13 16:19:01
Other Links: manifest | tags
Context
2010-05-13
18:22
Updated to use unified return codes check-in: 123c71d946 user: rkeene tags: trunk
16:19
Updated to determine subject from certificate check-in: 5534d640e4 user: rkeene tags: trunk
15:58
Updated to use certificate from identity in attribute finding

Updated to correctly pass certificate number check-in: 9b6cdd281c user: rkeene tags: trunk

Changes

Modified cackey.c from [2223838f44] to [cf1bec3529].

  1515   1515   
  1516   1516   				CACKEY_DEBUG_PRINTF(" ... returning %lu (%p/%lu)", (unsigned long) *((CK_BBOOL *) pValue), pValue, (unsigned long) ulValueLen);
  1517   1517   
  1518   1518   				break;
  1519   1519   			case CKA_LABEL:
  1520   1520   				CACKEY_DEBUG_PRINTF("Requesting attribute CKA_LABEL (0x%08lx) ...", (unsigned long) curr_attr_type);
  1521   1521   
  1522         -				/* XXX: Determine name */
         1522  +				/* Determine name */
         1523  +				if (certificate_len >= 0) {
         1524  +					x509_read_ret = x509_to_subject(certificate, certificate_len, &pValue);
         1525  +					if (x509_read_ret < 0) {
         1526  +						pValue = NULL;
         1527  +					} else {
         1528  +						ulValueLen = x509_read_ret;
         1529  +					}
         1530  +				}
  1523   1531   
  1524         -				CACKEY_DEBUG_PRINTF(" ... returning %s (%p/%lu)", (char *) ((CK_UTF8CHAR *) pValue), pValue, (unsigned long) ulValueLen);
         1532  +				CACKEY_DEBUG_PRINTF(" ... returning (%p/%lu)", pValue, (unsigned long) ulValueLen);
  1525   1533   
  1526   1534   				break;
  1527   1535   			case CKA_VALUE:
  1528   1536   				CACKEY_DEBUG_PRINTF("Requesting attribute CKA_VALUE (0x%08lx) ...", (unsigned long) curr_attr_type);
  1529   1537   
  1530   1538   				switch (objectclass) {
  1531   1539   					case CKO_PRIVATE_KEY: