65 lines
1.9 KiB
Diff
65 lines
1.9 KiB
Diff
diff --git a/pam_ssh_agent_auth-0.9.3/key.c b/pam_ssh_agent_auth-0.9.3/key.c
|
|
index 9555e7e..c17aae6 100644
|
|
--- a/pam_ssh_agent_auth-0.9.3/key.c
|
|
+++ b/pam_ssh_agent_auth-0.9.3/key.c
|
|
@@ -55,6 +55,7 @@
|
|
#include "uuencode.h"
|
|
#include "buffer.h"
|
|
#include "log.h"
|
|
+#include "digest.h"
|
|
|
|
Key *
|
|
key_new(int type)
|
|
@@ -181,7 +182,7 @@ key_equal(const Key *a, const Key *b)
|
|
}
|
|
|
|
u_char*
|
|
-key_fingerprint_raw(const Key *k, enum fp_type dgst_type,
|
|
+sshkey_fingerprint_raw(const Key *k, int dgst_type,
|
|
u_int *dgst_raw_length)
|
|
{
|
|
const EVP_MD *md = NULL;
|
|
@@ -194,10 +195,10 @@ key_fingerprint_raw(const Key *k, enum fp_type dgst_type,
|
|
*dgst_raw_length = 0;
|
|
|
|
switch (dgst_type) {
|
|
- case SSH_FP_MD5:
|
|
+ case SSH_DIGEST_MD5:
|
|
md = EVP_md5();
|
|
break;
|
|
- case SSH_FP_SHA1:
|
|
+ case SSH_DIGEST_SHA1:
|
|
md = EVP_sha1();
|
|
break;
|
|
default:
|
|
@@ -302,7 +303,7 @@ key_fingerprint_bubblebabble(u_char *dgst_raw, u_int dgst_raw_len)
|
|
}
|
|
|
|
char *
|
|
-key_fingerprint(const Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep)
|
|
+sshkey_fingerprint(const Key *k, int dgst_type, enum fp_rep dgst_rep)
|
|
{
|
|
char *retval = NULL;
|
|
u_char *dgst_raw;
|
|
diff --git a/pam_ssh_agent_auth-0.9.3/pam_user_key_allowed2.c b/pam_ssh_agent_auth-0.9.3/pam_user_key_allowed2.c
|
|
index dddcba9..8ba6d87 100644
|
|
--- a/pam_ssh_agent_auth-0.9.3/pam_user_key_allowed2.c
|
|
+++ b/pam_ssh_agent_auth-0.9.3/pam_user_key_allowed2.c
|
|
@@ -43,6 +43,7 @@
|
|
#include "buffer.h"
|
|
#include "log.h"
|
|
#include "compat.h"
|
|
+#include "digest.h"
|
|
#include "key.h"
|
|
#include "pathnames.h"
|
|
#include "misc.h"
|
|
@@ -118,7 +119,7 @@ pam_user_key_allowed2(struct passwd *pw, Key *key, char *file)
|
|
found_key = 1;
|
|
logit("matching key found: file %s, line %lu",
|
|
file, linenum);
|
|
- fp = key_fingerprint(found, SSH_FP_MD5, SSH_FP_HEX);
|
|
+ fp = sshkey_fingerprint(found, SSH_DIGEST_MD5, SSH_FP_HEX);
|
|
logit("Found matching %s key: %s",
|
|
key_type(found), fp);
|
|
free(fp);
|