1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-27 13:21:11 +03:00

Make use of const.

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@406 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-04-05 10:59:16 +00:00
parent 8253e2170e
commit db4ff30f38
2 changed files with 7 additions and 4 deletions

View File

@@ -248,11 +248,12 @@ void publickey_free(PUBLIC_KEY *key);
/* in keyfiles.c */ /* in keyfiles.c */
PRIVATE_KEY *privatekey_from_file(SSH_SESSION *session,char *filename,int type,const char *passphrase); PRIVATE_KEY *privatekey_from_file(SSH_SESSION *session, const char *filename,
int type, const char *passphrase);
STRING *publickey_to_string(PUBLIC_KEY *key); STRING *publickey_to_string(PUBLIC_KEY *key);
PUBLIC_KEY *publickey_from_privatekey(PRIVATE_KEY *prv); PUBLIC_KEY *publickey_from_privatekey(PRIVATE_KEY *prv);
void private_key_free(PRIVATE_KEY *prv); void private_key_free(PRIVATE_KEY *prv);
STRING *publickey_from_file(SSH_SESSION *session, char *filename,int *_type); STRING *publickey_from_file(SSH_SESSION *session, const char *filename,int *_type);
STRING *publickey_from_next_file(SSH_SESSION *session, const char **pub_keys_path, STRING *publickey_from_next_file(SSH_SESSION *session, const char **pub_keys_path,
const char **keys_path, char **privkeyfile, int *type, int *count); const char **keys_path, char **privkeyfile, int *type, int *count);
int ssh_is_server_known(SSH_SESSION *session); int ssh_is_server_known(SSH_SESSION *session);

View File

@@ -499,7 +499,8 @@ static int pem_get_password(char *buf, int size, int rwflag, void *userdata) {
* \see private_key_free() * \see private_key_free()
* \see publickey_from_privatekey() * \see publickey_from_privatekey()
*/ */
PRIVATE_KEY *privatekey_from_file(SSH_SESSION *session,char *filename,int type, const char *passphrase){ PRIVATE_KEY *privatekey_from_file(SSH_SESSION *session, const char *filename,
int type, const char *passphrase) {
FILE *file=fopen(filename,"r"); FILE *file=fopen(filename,"r");
PRIVATE_KEY *privkey; PRIVATE_KEY *privkey;
ssh_auth_callback auth_cb = NULL; ssh_auth_callback auth_cb = NULL;
@@ -684,7 +685,8 @@ void private_key_free(PRIVATE_KEY *prv) {
* \see string_free() * \see string_free()
* \see publickey_from_privatekey() * \see publickey_from_privatekey()
*/ */
STRING *publickey_from_file(SSH_SESSION *session,char *filename,int *_type){ STRING *publickey_from_file(SSH_SESSION *session, const char *filename,
int *_type) {
BUFFER *buffer; BUFFER *buffer;
int type; int type;
STRING *str; STRING *str;