mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 18:50:28 +09:00
Fix build errors.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@241 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -212,7 +212,7 @@ int privatekey_decrypt(int algo, int mode, unsigned int key_len,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else if (cb == NULL && userdata != NULL) {
|
} else if (cb == NULL && userdata != NULL) {
|
||||||
sprintf(buf, MAX_PASSPHRASE_SIZE, "%s", userdata);
|
sprintf(passphrase, MAX_PASSPHRASE_SIZE, "%s", userdata);
|
||||||
}
|
}
|
||||||
passphrase_to_key(passphrase, strlen(passphrase), iv, key, key_len);
|
passphrase_to_key(passphrase, strlen(passphrase), iv, key, key_len);
|
||||||
if (gcry_cipher_open(&cipher, algo, mode, 0)
|
if (gcry_cipher_open(&cipher, algo, mode, 0)
|
||||||
@@ -421,7 +421,7 @@ int read_rsa_privatekey(FILE *fp, gcry_sexp_t *r,
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int read_dsa_privatekey(FILE *fp, gcry_sexp_t *r, ssh_auth_callback cb, void *userdata; char *desc)
|
int read_dsa_privatekey(FILE *fp, gcry_sexp_t *r, ssh_auth_callback cb, void *userdata, char *desc)
|
||||||
{
|
{
|
||||||
STRING *p;
|
STRING *p;
|
||||||
STRING *q;
|
STRING *q;
|
||||||
@@ -606,7 +606,7 @@ PRIVATE_KEY *_privatekey_from_file(void *session,char *filename,int type){
|
|||||||
}
|
}
|
||||||
if(type==TYPE_DSS){
|
if(type==TYPE_DSS){
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
valid=read_dsa_privatekey(file,&dsa,NULL,NULL);
|
valid=read_dsa_privatekey(file,&dsa,NULL,NULL,NULL);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
if(!valid){
|
if(!valid){
|
||||||
ssh_set_error(session,SSH_FATAL,"parsing private key %s"
|
ssh_set_error(session,SSH_FATAL,"parsing private key %s"
|
||||||
@@ -623,7 +623,7 @@ PRIVATE_KEY *_privatekey_from_file(void *session,char *filename,int type){
|
|||||||
}
|
}
|
||||||
else if (type==TYPE_RSA){
|
else if (type==TYPE_RSA){
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
valid=read_rsa_privatekey(file,&rsa,NULL,NULL);
|
valid=read_rsa_privatekey(file,&rsa,NULL,NULL,NULL);
|
||||||
fclose(file);
|
fclose(file);
|
||||||
if(!valid){
|
if(!valid){
|
||||||
ssh_set_error(session,SSH_FATAL,"parsing private key %s"
|
ssh_set_error(session,SSH_FATAL,"parsing private key %s"
|
||||||
|
|||||||
Reference in New Issue
Block a user