mirror of
https://github.com/clearml/dropbear
synced 2025-02-12 07:25:30 +00:00
Some small fixes for unused vars, and old messages
--HG-- extra : convert_revision : 83d9a25ee973ab65fa64dcf8595838b160c21663
This commit is contained in:
parent
3cacc54b78
commit
ee23b01f0b
@ -47,10 +47,8 @@ static void printhelp(char * progname) {
|
|||||||
"dropbear\n"
|
"dropbear\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Example:\n"
|
"Example:\n"
|
||||||
"dropbearconvert openssh dropbear /etc/ssh/ssh_host_rsa_key /etc/dropbear_rsa_host_key\n"
|
"dropbearconvert openssh dropbear /etc/ssh/ssh_host_rsa_key /etc/dropbear_rsa_host_key\n",
|
||||||
"\n"
|
progname);
|
||||||
"The inputfile and outputfile can be '-' to specify\n"
|
|
||||||
"standard input or standard output.\n", progname);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(DBMULTI_dropbearconvert) || !defined(DROPBEAR_MULTI)
|
#if defined(DBMULTI_dropbearconvert) || !defined(DROPBEAR_MULTI)
|
||||||
|
@ -108,13 +108,10 @@ int import_write(const char *filename, sign_key *key, char *passphrase,
|
|||||||
static sign_key *dropbear_read(const char* filename) {
|
static sign_key *dropbear_read(const char* filename) {
|
||||||
|
|
||||||
buffer * buf = NULL;
|
buffer * buf = NULL;
|
||||||
int len, maxlen;
|
|
||||||
FILE *fp = NULL;
|
|
||||||
sign_key *ret = NULL;
|
sign_key *ret = NULL;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
buf = buf_new(MAX_PRIVKEY_SIZE);
|
buf = buf_new(MAX_PRIVKEY_SIZE);
|
||||||
/* buf_readfile knows about "-" */
|
|
||||||
if (buf_readfile(buf, filename) == DROPBEAR_FAILURE) {
|
if (buf_readfile(buf, filename) == DROPBEAR_FAILURE) {
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -163,11 +160,7 @@ static int dropbear_write(const char*filename, sign_key * key) {
|
|||||||
buf = buf_new(MAX_PRIVKEY_SIZE);
|
buf = buf_new(MAX_PRIVKEY_SIZE);
|
||||||
buf_put_priv_key(buf, key, keytype);
|
buf_put_priv_key(buf, key, keytype);
|
||||||
|
|
||||||
if (strlen(filename) == 1 && filename[0] == '-') {
|
|
||||||
fp = stdout;
|
|
||||||
} else {
|
|
||||||
fp = fopen(filename, "w");
|
fp = fopen(filename, "w");
|
||||||
}
|
|
||||||
if (!fp) {
|
if (!fp) {
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
Reference in New Issue
Block a user