int rpmPkgSign(const char *path, const struct rpmSignArgs * args) { int rc; if (args) { if (args->hashalgo) { char *algo = NULL; rasprintf(&algo, "%d", args->hashalgo); addMacro(NULL, "_gpg_digest_algo", NULL, algo, RMIL_GLOBAL); free(algo); } if (args->keyid) { addMacro(NULL, "_gpg_name", NULL, args->keyid, RMIL_GLOBAL); } } rc = rpmSign(path, 0, args->signfiles); if (args) { if (args->hashalgo) { delMacro(NULL, "_gpg_digest_algo"); } if (args->keyid) { delMacro(NULL, "_gpg_name"); } } return rc; }
int rpmPkgDelSign(const char *path, const struct rpmSignArgs * args) { return rpmSign(path, 1, 0); }
int rpmPkgDelSign(const char *path) { return rpmSign(path, 1, 0); }