1
0
mirror of https://git.code.sf.net/p/linux-ima/ima-evm-utils synced 2025-07-01 05:11:13 +02:00

Must use 'const char*'

Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@huawei.com>
This commit is contained in:
Dmitry Kasatkin
2015-07-23 21:46:21 +03:00
parent 6a712b3b38
commit 96e55082c2
3 changed files with 12 additions and 11 deletions

View File

@ -491,7 +491,7 @@ static int get_hash_algo_from_sig(unsigned char *sig)
int verify_hash(const unsigned char *hash, int size, unsigned char *sig, int siglen)
{
char *key;
const char *key;
int x509;
verify_hash_fn_t verify_hash;
@ -611,7 +611,7 @@ void calc_keyid_v2(uint32_t *keyid, char *str, RSA *key)
free(pkey);
}
static RSA *read_priv_key(const char *keyfile, char *keypass)
static RSA *read_priv_key(const char *keyfile, const char *keypass)
{
FILE *fp;
RSA *key;
@ -622,7 +622,7 @@ static RSA *read_priv_key(const char *keyfile, char *keypass)
return NULL;
}
ERR_load_crypto_strings();
key = PEM_read_RSAPrivateKey(fp, NULL, NULL, keypass);
key = PEM_read_RSAPrivateKey(fp, NULL, NULL, (void *)keypass);
if (!key) {
char str[256];
@ -795,7 +795,7 @@ out:
}
int sign_hash(const char *hashalgo, const unsigned char *hash, int size, const char *keyfile, char *keypass, unsigned char *sig)
int sign_hash(const char *hashalgo, const unsigned char *hash, int size, const char *keyfile, const char *keypass, unsigned char *sig)
{
if (keypass)
params.keypass = keypass;