Revert "Sign repodata"

This reverts commit 04194f44c8.
This commit is contained in:
Juan RP
2020-01-06 14:31:40 +01:00
parent 9c61e341b1
commit b4fdc39e67
8 changed files with 21 additions and 98 deletions

View File

@@ -40,14 +40,13 @@
bool
repodata_flush(struct xbps_handle *xhp, const char *repodir,
const char *reponame, xbps_dictionary_t idx, xbps_dictionary_t meta,
const char *compression, const char *privkey)
const char *compression)
{
struct archive *ar;
char *repofile, *tname, *buf;
unsigned char *sig = NULL;
const char *signature_type = NULL;
int rv, repofd = -1;
unsigned int siglen, buflen;
mode_t mask;
bool result;
@@ -97,9 +96,8 @@ repodata_flush(struct xbps_handle *xhp, const char *repodir,
rv = xbps_archive_append_buf(ar, buf, strlen(buf),
XBPS_REPOIDX, 0644, "root", "root");
free(buf);
if (rv != 0) {
if (rv != 0)
return false;
}
/* XBPS_REPOIDX_META */
if (meta == NULL) {
@@ -116,8 +114,7 @@ repodata_flush(struct xbps_handle *xhp, const char *repodir,
if (rv != 0)
return false;
if (xbps_dictionary_get_cstring_nocopy(meta, "signature-type", &signature_type))
{
if (xbps_dictionary_get_cstring_nocopy(meta, "signature-type", &signature_type)) {
rv = sign_buffer(buf, buflen, privkey, &sig, &siglen);
free(buf);
if (rv != 0) {