1
1

legacy: Remove privatekey_from_base64().

This function has been introduced for libssh 0.6. So we can remove it
completely.
Этот коммит содержится в:
Andreas Schneider 2011-08-26 21:46:56 +02:00
родитель 5a0735d1e8
Коммит 1d734f16cf
3 изменённых файлов: 0 добавлений и 40 удалений

Просмотреть файл

@ -30,7 +30,4 @@ ssh_string try_publickey_from_file(ssh_session session,
struct ssh_keys_struct keytab,
char **privkeyfile, int *type);
ssh_private_key privatekey_from_base64(ssh_session session, const char *b64_pkey,
int type, const char *passphrase);
#endif /* KEYFILES_H_ */

Просмотреть файл

@ -547,9 +547,6 @@ LIBSSH_API int ssh_event_remove_fd(ssh_event event, socket_t fd);
LIBSSH_API int ssh_event_remove_session(ssh_event event, ssh_session session);
LIBSSH_API void ssh_event_free(ssh_event event);
LIBSSH_API ssh_private_key privatekey_from_base64(ssh_session session, const char *b64_pkey,
int type, const char *passphrase);
#ifndef LIBSSH_LEGACY_0_4
#include "libssh/legacy.h"
#endif

Просмотреть файл

@ -343,40 +343,6 @@ char *string_to_char(ssh_string str){
return ssh_string_to_char(str);
}
ssh_private_key privatekey_from_base64(ssh_session session,
const char *b64_pkey,
int type,
const char *passphrase) {
ssh_auth_callback auth_fn = NULL;
void *auth_data = NULL;
ssh_private_key privkey;
ssh_key key;
(void) type; /* unused */
if (session->common.callbacks) {
auth_fn = session->common.callbacks->auth_function;
auth_data = session->common.callbacks->userdata;
}
key = pki_private_key_from_base64(b64_pkey, passphrase, auth_fn, auth_data);
if (key == NULL) {
return NULL;
}
privkey = malloc(sizeof(struct ssh_private_key_struct));
if (privkey == NULL) {
ssh_key_free(key);
return NULL;
}
privkey->type = key->type;
privkey->dsa_priv = key->dsa;
privkey->rsa_priv = key->rsa;
return privkey;
}
ssh_private_key privatekey_from_file(ssh_session session,
const char *filename,
int type,