aboutsummaryrefslogtreecommitdiff
path: root/libssh/keyfiles.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2010-04-28 12:14:03 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2010-04-28 12:14:03 +0200
commit904c6ed853af02c4de5ad45356345c5b50e9f62f (patch)
treefec7f56b1000d8ebf8dacd1e9bb49da60fe2bf5c /libssh/keyfiles.c
parent186e07b415b1699be75961d306df369b537da855 (diff)
downloadlibssh-904c6ed853af02c4de5ad45356345c5b50e9f62f.tar.gz
libssh-904c6ed853af02c4de5ad45356345c5b50e9f62f.tar.xz
libssh-904c6ed853af02c4de5ad45356345c5b50e9f62f.zip
Renamed private type TYPE_RSA to SSH_KEYTYPE_*
Also made this enum public
Diffstat (limited to 'libssh/keyfiles.c')
-rw-r--r--libssh/keyfiles.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libssh/keyfiles.c b/libssh/keyfiles.c
index f05cd736..0fa67b33 100644
--- a/libssh/keyfiles.c
+++ b/libssh/keyfiles.c
@@ -619,10 +619,10 @@ static int privatekey_type_from_file(FILE *fp) {
}
fseek(fp, 0, SEEK_SET);
if (strncmp(buffer, DSA_HEADER_BEGIN, strlen(DSA_HEADER_BEGIN)) == 0) {
- return TYPE_DSS;
+ return SSH_KEYTYPE_DSS;
}
if (strncmp(buffer, RSA_HEADER_BEGIN, strlen(RSA_HEADER_BEGIN)) == 0) {
- return TYPE_RSA;
+ return SSH_KEYTYPE_RSA;
}
return 0;
}
@@ -691,7 +691,7 @@ ssh_private_key privatekey_from_file(ssh_session session, const char *filename,
}
}
switch (type) {
- case TYPE_DSS:
+ case SSH_KEYTYPE_DSS:
if (passphrase == NULL) {
if (session->callbacks && session->callbacks->auth_function) {
auth_cb = session->callbacks->auth_function;
@@ -731,7 +731,7 @@ ssh_private_key privatekey_from_file(ssh_session session, const char *filename,
return NULL;
}
break;
- case TYPE_RSA:
+ case SSH_KEYTYPE_RSA:
if (passphrase == NULL) {
if (session->callbacks && session->callbacks->auth_function) {
auth_cb = session->callbacks->auth_function;
@@ -832,7 +832,7 @@ ssh_private_key _privatekey_from_file(void *session, const char *filename,
}
switch (type) {
- case TYPE_DSS:
+ case SSH_KEYTYPE_DSS:
#ifdef HAVE_LIBGCRYPT
valid = read_dsa_privatekey(file, &dsa, NULL, NULL, NULL);
@@ -853,7 +853,7 @@ ssh_private_key _privatekey_from_file(void *session, const char *filename,
return NULL;
}
break;
- case TYPE_RSA:
+ case SSH_KEYTYPE_RSA:
#ifdef HAVE_LIBGCRYPT
valid = read_rsa_privatekey(file, &rsa, NULL, NULL, NULL);