vishalmishra434 / rpms / openssh

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