|
Lines 433-439
pkcs11_fetch_keys(struct pkcs11_provider
Link Here
|
| 433 |
error("C_GetAttributeValue failed: %lu", rv); |
433 |
error("C_GetAttributeValue failed: %lu", rv); |
| 434 |
continue; |
434 |
continue; |
| 435 |
} |
435 |
} |
| 436 |
/* allocate buffers for attributes, XXX check ulValueLen? */ |
436 |
/* check that none of the attributes are zero length */ |
|
|
437 |
if (attribs[0].ulValueLen == 0 || |
| 438 |
attribs[1].ulValueLen == 0 || |
| 439 |
attribs[2].ulValueLen == 0) { |
| 440 |
continue; |
| 441 |
} |
| 442 |
/* allocate buffers for attributes */ |
| 437 |
for (i = 0; i < 3; i++) |
443 |
for (i = 0; i < 3; i++) |
| 438 |
attribs[i].pValue = xmalloc(attribs[i].ulValueLen); |
444 |
attribs[i].pValue = xmalloc(attribs[i].ulValueLen); |
| 439 |
/* retrieve ID, modulus and public exponent of RSA key */ |
445 |
/* retrieve ID, modulus and public exponent of RSA key */ |