return CSSMERR_CSP_INTERNAL_ERROR;
}
- *outTextLen = moved;
+ *outTextLen = (unsigned)moved;
return CSSM_OK;
}
}
/* here it is */
- CC_MD5(pwd.Data, pwd.Length, keyData->Data);
+ CC_MD5(pwd.Data, (CC_LONG)pwd.Length, keyData->Data);
}
appendBigNum(ptext, rsa->p);
/* pad to block boundary */
- unsigned ptextLen = CFDataGetLength(ptext);
+ CFIndex ptextLen = CFDataGetLength(ptext);
unsigned padding = 0;
- unsigned rem = ptextLen & 0x7;
+ unsigned rem = (unsigned)ptextLen & 0x7;
if(rem) {
padding = 8 - rem;
}
unsigned char ctext[ptextLen];
unsigned ctextLen;
ourRtn = ssh1DES3Crypt(cipherSpec, true,
- (unsigned char *)CFDataGetBytePtr(ptext), ptextLen,
+ (unsigned char *)CFDataGetBytePtr(ptext), (unsigned)ptextLen,
encryptKey, encryptKey ? CC_MD5_DIGEST_LENGTH : 0,
ctext, &ctextLen);
if(ourRtn != 0) {
unsigned commentLen = 0;
if((DescriptiveData != NULL) && (DescriptiveData->Length != 0)) {
comment = (const UInt8 *)DescriptiveData->Data;
- commentLen = DescriptiveData->Length;
+ commentLen = (unsigned)DescriptiveData->Length;
}
/* generate the encrypted blob */
}
/* allocate key data in session's memory space */
- unsigned len = CFDataGetLength(cfOut);
+ CFIndex len = CFDataGetLength(cfOut);
setUpData(WrappedKey.KeyData, len, normAllocator);
memmove(WrappedKey.KeyData.Data, CFDataGetBytePtr(cfOut), len);
CFRelease(cfOut);
uint8 **comment, /* optional, mallocd and RETURNED */
unsigned *commentLen) /* RETURNED */
{
- unsigned len = strlen(authfile_id_string);
+ unsigned len = (unsigned)strlen(authfile_id_string);
const unsigned char *cp = encodedKey;
unsigned remLen = encodedKeyLen;
CSSM_RETURN ourRtn = CSSM_OK;
RSABinaryKey *binKey = NULL;
ourRtn = decodeOpenSSHv1PrivKey((const unsigned char *)WrappedKey.KeyData.Data,
- WrappedKey.KeyData.Length,
+ (unsigned)WrappedKey.KeyData.Length,
rsa, unwrapKey, &comment, &commentLen);
if(ourRtn) {
goto errOut;