/* Put in BE mode the leftmost part of the hash as the final digest.
See FIPS PUB 180-4 section 6.7. */
- CURL_PUT_64BIT_BE(digest + 0 * SHA512_256_BYTES_IN_WORD, ctx->H[0]);
- CURL_PUT_64BIT_BE(digest + 1 * SHA512_256_BYTES_IN_WORD, ctx->H[1]);
- CURL_PUT_64BIT_BE(digest + 2 * SHA512_256_BYTES_IN_WORD, ctx->H[2]);
- CURL_PUT_64BIT_BE(digest + 3 * SHA512_256_BYTES_IN_WORD, ctx->H[3]);
+ CURL_PUT_64BIT_BE(digest + (0 * SHA512_256_BYTES_IN_WORD), ctx->H[0]);
+ CURL_PUT_64BIT_BE(digest + (1 * SHA512_256_BYTES_IN_WORD), ctx->H[1]);
+ CURL_PUT_64BIT_BE(digest + (2 * SHA512_256_BYTES_IN_WORD), ctx->H[2]);
+ CURL_PUT_64BIT_BE(digest + (3 * SHA512_256_BYTES_IN_WORD), ctx->H[3]);
/* Erase potentially sensitive data. */
memset(ctx, 0, sizeof(struct Curl_sha512_256ctx));
unsigned int patch = (unsigned int)(api.ldapai_vendor_version % 100);
unsigned int major = (unsigned int)(api.ldapai_vendor_version / 10000);
unsigned int minor =
- (((unsigned int)api.ldapai_vendor_version - major * 10000)
+ (((unsigned int)api.ldapai_vendor_version - (major * 10000))
- patch) / 100;
curl_msnprintf(buf, bufsz, "%s/%u.%u.%u",
api.ldapai_vendor_name, major, minor, patch);
if(!sshc->sftp_file) {
int err = sftp_get_error(sshc->sftp_session);
- if(((err == SSH_FX_NO_SUCH_FILE || err == SSH_FX_FAILURE ||
- err == SSH_FX_NO_SUCH_PATH)) &&
- (data->set.ftp_create_missing_dirs &&
- (strlen(sshp->path) > 1))) {
+ if((err == SSH_FX_NO_SUCH_FILE ||
+ err == SSH_FX_FAILURE ||
+ err == SSH_FX_NO_SUCH_PATH) &&
+ data->set.ftp_create_missing_dirs &&
+ (strlen(sshp->path) > 1)) {
/* try to create the path remotely */
rc = 0;
sshc->secondCreateDirs = 1;
sftp_libssh2_strerror(sftperr));
return sftp_libssh2_error_to_CURLE(sftperr);
}
- if(((sftperr == LIBSSH2_FX_NO_SUCH_FILE) ||
- (sftperr == LIBSSH2_FX_FAILURE) ||
- (sftperr == LIBSSH2_FX_NO_SUCH_PATH)) &&
- (data->set.ftp_create_missing_dirs &&
- (strlen(sshp->path) > 1))) {
+ if((sftperr == LIBSSH2_FX_NO_SUCH_FILE ||
+ sftperr == LIBSSH2_FX_FAILURE ||
+ sftperr == LIBSSH2_FX_NO_SUCH_PATH) &&
+ data->set.ftp_create_missing_dirs &&
+ (strlen(sshp->path) > 1)) {
/* try to create the path remotely */
sshc->secondCreateDirs = 1;
myssh_to(data, sshc, SSH_SFTP_CREATE_DIRS_INIT);
}
#endif /* USE_ECH */
- cipher_suites = curlx_malloc(sizeof(*cipher_suites) * (cipher_suites_len));
+ cipher_suites = curlx_malloc(sizeof(*cipher_suites) * cipher_suites_len);
if(!cipher_suites) {
result = CURLE_OUT_OF_MEMORY;
goto cleanup;