Skip to content
This repository was archived by the owner on Jun 6, 2021. It is now read-only.

Commit

Permalink
Fixed more warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Heartmender authored and kaniini committed Apr 19, 2013
1 parent 03f76c4 commit 2b937f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/auth/ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static bool ldap_auth_user(myuser_t *mu, const char *password)
{
ldap_config_ready(NULL);
}
if ((ldap_conn == NULL))
if (ldap_conn == NULL)
{
slog(LG_INFO, "ldap_auth_user(): no connection");
return false;
Expand Down
2 changes: 1 addition & 1 deletion modules/crypto/pbkdf2.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static const char *pbkdf2_crypt(const char *key, const char *salt)

memcpy(outbuf, salt, SALTLEN);

res = PKCS5_PBKDF2_HMAC(key, strlen(key), salt, SALTLEN, ROUNDS, EVP_sha512(), SHA512_DIGEST_LENGTH, digestbuf);
res = PKCS5_PBKDF2_HMAC(key, strlen(key), (const unsigned char *)salt, SALTLEN, ROUNDS, EVP_sha512(), SHA512_DIGEST_LENGTH, digestbuf);

for (iter = 0; iter < SHA512_DIGEST_LENGTH; iter++)
sprintf(outbuf + SALTLEN + (iter * 2), "%02x", 255 & digestbuf[iter]);
Expand Down
4 changes: 2 additions & 2 deletions modules/saslserv/ecdsa-nist256p-challenge.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static int mech_step_accname(sasl_session_t *p, char *message, int len, char **o
if (md == NULL)
return ASASL_FAIL;

ret = base64_decode(md->value, pubkey_raw, BUFSIZE);
ret = base64_decode(md->value, (char *)pubkey_raw, BUFSIZE);
if (ret == -1)
return ASASL_FAIL;

Expand All @@ -122,7 +122,7 @@ static int mech_step_response(sasl_session_t *p, char *message, int len, char **
{
ecdsa_session_t *s = p->mechdata;

if (!ECDSA_verify(0, s->challenge, CHALLENGE_LENGTH, message, len, s->pubkey))
if (!ECDSA_verify(0, s->challenge, CHALLENGE_LENGTH, (const unsigned char *)message, len, s->pubkey))
return ASASL_FAIL;

return ASASL_DONE;
Expand Down
2 changes: 1 addition & 1 deletion src/ecdsakeygen/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ int main(int argc, const char **argv)
workbuf_p = workbuf;
i2o_ECPublicKey(prv, &workbuf_p);
workbuf_p = workbuf;
base64_encode(workbuf_p, len, encbuf, BUFSIZE);
base64_encode((const char *)workbuf_p, len, encbuf, BUFSIZE);

printf("Keypair:\n");
EC_KEY_print_fp(stdout, prv, 4);
Expand Down

0 comments on commit 2b937f3

Please sign in to comment.