[BACK]Return to ssh-pkcs11.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/ssh-pkcs11.c between version 1.20 and 1.21

version 1.20, 2015/07/18 08:00:21 version 1.21, 2015/07/18 08:02:17
Line 470 
Line 470 
                         error("C_GetAttributeValue failed: %lu", rv);                          error("C_GetAttributeValue failed: %lu", rv);
                         continue;                          continue;
                 }                  }
                 /* check that none of the attributes are zero length */                  /*
                 if (attribs[0].ulValueLen == 0 ||                   * Allow CKA_ID (always first attribute) to be empty, but
                     attribs[1].ulValueLen == 0 ||                   * ensure that none of the others are zero length.
                    * XXX assumes CKA_ID is always first.
                    */
                   if (attribs[1].ulValueLen == 0 ||
                     attribs[2].ulValueLen == 0) {                      attribs[2].ulValueLen == 0) {
                         continue;                          continue;
                 }                  }
                 /* allocate buffers for attributes */                  /* allocate buffers for attributes */
                 for (i = 0; i < 3; i++)                  for (i = 0; i < 3; i++) {
                         attribs[i].pValue = xmalloc(attribs[i].ulValueLen);                          if (attribs[i].ulValueLen > 0) {
                                   attribs[i].pValue = xmalloc(
                                       attribs[i].ulValueLen);
                           }
                   }
   
                 /*                  /*
                  * retrieve ID, modulus and public exponent of RSA key,                   * retrieve ID, modulus and public exponent of RSA key,
                  * or ID, subject and value for certificates.                   * or ID, subject and value for certificates.

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21