|
|
2f70a7 |
diff --git a/src/libimaevm.c b/src/libimaevm.c
|
|
|
2f70a7 |
index 6fa0ed4..b6f9b9f 100644
|
|
|
2f70a7 |
--- a/src/libimaevm.c
|
|
|
2f70a7 |
+++ b/src/libimaevm.c
|
|
|
2f70a7 |
@@ -672,12 +672,11 @@ void calc_keyid_v1(uint8_t *keyid, char *str, const unsigned char *pkey, int len
|
|
|
2f70a7 |
memcpy(keyid, sha1 + 12, 8);
|
|
|
2f70a7 |
log_debug("keyid: ");
|
|
|
2f70a7 |
log_debug_dump(keyid, 8);
|
|
|
2f70a7 |
+ id = __be64_to_cpup((__be64 *) keyid);
|
|
|
2f70a7 |
+ sprintf(str, "%llX", (unsigned long long)id);
|
|
|
2f70a7 |
|
|
|
2f70a7 |
- if (params.verbose > LOG_INFO) {
|
|
|
2f70a7 |
- id = __be64_to_cpup((__be64 *) keyid);
|
|
|
2f70a7 |
- sprintf(str, "%llX", (unsigned long long)id);
|
|
|
2f70a7 |
+ if (params.verbose > LOG_INFO)
|
|
|
2f70a7 |
log_info("keyid-v1: %s\n", str);
|
|
|
2f70a7 |
- }
|
|
|
2f70a7 |
}
|
|
|
2f70a7 |
|
|
|
2f70a7 |
void calc_keyid_v2(uint32_t *keyid, char *str, RSA *key)
|
|
|
2f70a7 |
@@ -694,11 +693,10 @@ void calc_keyid_v2(uint32_t *keyid, char *str, RSA *key)
|
|
|
2f70a7 |
memcpy(keyid, sha1 + 16, 4);
|
|
|
2f70a7 |
log_debug("keyid: ");
|
|
|
2f70a7 |
log_debug_dump(keyid, 4);
|
|
|
2f70a7 |
+ sprintf(str, "%x", __be32_to_cpup(keyid));
|
|
|
2f70a7 |
|
|
|
2f70a7 |
- if (params.verbose > LOG_INFO) {
|
|
|
2f70a7 |
- sprintf(str, "%x", __be32_to_cpup(keyid));
|
|
|
2f70a7 |
+ if (params.verbose > LOG_INFO)
|
|
|
2f70a7 |
log_info("keyid: %s\n", str);
|
|
|
2f70a7 |
- }
|
|
|
2f70a7 |
|
|
|
2f70a7 |
free(pkey);
|
|
|
2f70a7 |
}
|
|
|
2f70a7 |
--
|
|
|
2f70a7 |
2.19.1
|
|
|
2f70a7 |
|