From 6773fb81abf9d35b1ceea85eeba791de2521e12d Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 17:16:45 +0000 Subject: Prepare for a new update Reverting patches so we can apply the latest update and changes can be seen in the spec file and sources. --- diff --git a/Makefile.am b/Makefile.am index d90c587..06ebf59 100644 --- a/Makefile.am +++ b/Makefile.am @@ -24,7 +24,7 @@ rpm: $(tarname) rpmbuild -ba --nodeps $(SPEC) # requires asciidoc, xslproc, docbook-xsl -MANPAGE_DOCBOOK_XSL = /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl +MANPAGE_DOCBOOK_XSL = /usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl evmctl.1.html: README @asciidoc -o $@ $< diff --git a/configure.ac b/configure.ac index 34e4a81..6822f39 100644 --- a/configure.ac +++ b/configure.ac @@ -36,9 +36,9 @@ AC_CHECK_HEADERS(keyutils.h, , [AC_MSG_ERROR([keyutils.h header not found. You n #debug support - yes for a while PKG_ARG_ENABLE(debug, "yes", DEBUG, [Enable Debug support]) if test $pkg_cv_enable_debug = yes; then - CFLAGS="$CFLAGS -g -O2 -Wall -Wstrict-prototypes -pipe" + CFLAGS="$CFLAGS -g -O1 -Wall -Wstrict-prototypes -pipe" else - CFLAGS="$CFLAGS -O2 -Wall -Wstrict-prototypes -pipe -fomit-frame-pointer" + CFLAGS="$CFLAGS -Wall -Wstrict-prototypes -pipe -fomit-frame-pointer" fi # for gcov diff --git a/src/evmctl.c b/src/evmctl.c index b80a1c9..2ffee78 100644 --- a/src/evmctl.c +++ b/src/evmctl.c @@ -1716,7 +1716,7 @@ static char *get_password(void) if (tcsetattr(fileno(stdin), TCSANOW, &tmp_flags) != 0) { perror("tcsetattr"); - goto get_pwd_err; + return NULL; } printf("PEM password: "); @@ -1725,14 +1725,10 @@ static char *get_password(void) /* restore terminal */ if (tcsetattr(fileno(stdin), TCSANOW, &flags) != 0) { perror("tcsetattr"); - goto get_pwd_err; + return NULL; } - free(password); return pwd; -get_pwd_err: - free(password); - return NULL; } int main(int argc, char *argv[]) diff --git a/src/libimaevm.c b/src/libimaevm.c index ce0f745..6fa0ed4 100644 --- a/src/libimaevm.c +++ b/src/libimaevm.c @@ -466,8 +466,6 @@ void init_public_keys(const char *keyfiles) entry->next = public_keys; public_keys = entry; } - - free(tmp_keyfiles); } int verify_hash_v2(const char *file, const unsigned char *hash, int size, @@ -674,11 +672,12 @@ void calc_keyid_v1(uint8_t *keyid, char *str, const unsigned char *pkey, int len memcpy(keyid, sha1 + 12, 8); log_debug("keyid: "); log_debug_dump(keyid, 8); - id = __be64_to_cpup((__be64 *) keyid); - sprintf(str, "%llX", (unsigned long long)id); - if (params.verbose > LOG_INFO) + if (params.verbose > LOG_INFO) { + id = __be64_to_cpup((__be64 *) keyid); + sprintf(str, "%llX", (unsigned long long)id); log_info("keyid-v1: %s\n", str); + } } void calc_keyid_v2(uint32_t *keyid, char *str, RSA *key) @@ -695,10 +694,11 @@ void calc_keyid_v2(uint32_t *keyid, char *str, RSA *key) memcpy(keyid, sha1 + 16, 4); log_debug("keyid: "); log_debug_dump(keyid, 4); - sprintf(str, "%x", __be32_to_cpup(keyid)); - if (params.verbose > LOG_INFO) + if (params.verbose > LOG_INFO) { + sprintf(str, "%x", __be32_to_cpup(keyid)); log_info("keyid: %s\n", str); + } free(pkey); }