summaryrefslogtreecommitdiffstats
path: root/libssh
diff options
context:
space:
mode:
Diffstat (limited to 'libssh')
-rw-r--r--libssh/dh.c2
-rw-r--r--libssh/keyfiles.c3
-rw-r--r--libssh/keys.c2
-rw-r--r--libssh/misc.c2
4 files changed, 5 insertions, 4 deletions
diff --git a/libssh/dh.c b/libssh/dh.c
index 0ef3c90..24e7257 100644
--- a/libssh/dh.c
+++ b/libssh/dh.c
@@ -128,7 +128,7 @@ void ssh_crypto_finalize(void){
}
/* prints the bignum on stderr */
-void ssh_print_bignum(char *which,bignum num){
+void ssh_print_bignum(const char *which,bignum num){
#ifdef HAVE_LIBGCRYPT
unsigned char *hex;
bignum_bn2hex(num,&hex);
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c
index 73a8704..22ead29 100644
--- a/libssh/keyfiles.c
+++ b/libssh/keyfiles.c
@@ -596,7 +596,8 @@ PRIVATE_KEY *privatekey_from_file(SSH_SESSION *session, const char *filename,
}
/* same that privatekey_from_file() but without any passphrase things. */
-PRIVATE_KEY *_privatekey_from_file(void *session,char *filename,int type){
+PRIVATE_KEY *_privatekey_from_file(void *session, const char *filename,
+ int type) {
FILE *file=fopen(filename,"r");
PRIVATE_KEY *privkey;
#ifdef HAVE_LIBGCRYPT
diff --git a/libssh/keys.c b/libssh/keys.c
index b1a9cc0..f7cf8e7 100644
--- a/libssh/keys.c
+++ b/libssh/keys.c
@@ -48,7 +48,7 @@ const char *ssh_type_to_char(int type) {
}
}
-int ssh_type_from_name(char *name) {
+int ssh_type_from_name(const char *name) {
if (strcmp(name, "rsa1") == 0) {
return TYPE_RSA1;
} else if (strcmp(name, "rsa") == 0) {
diff --git a/libssh/misc.c b/libssh/misc.c
index c619530..3f404fd 100644
--- a/libssh/misc.c
+++ b/libssh/misc.c
@@ -95,7 +95,7 @@ char *ssh_get_user_home_dir(void) {
#endif
/* we have read access on file */
-int ssh_file_readaccess_ok(char *file){
+int ssh_file_readaccess_ok(const char *file){
if(!access(file,R_OK))
return 1;
return 0;