]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
packages: Drop any hexdigest helper functions
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Oct 2022 11:14:10 +0000 (11:14 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 11 Oct 2022 11:19:34 +0000 (11:19 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/include/pakfire/package.h
src/libpakfire/libpakfire.sym
src/libpakfire/package.c

index 9ba647c4a47db6d5fc1e037d7e638f2aaee2f72e..732f961e3ec02e4fa1f749669f5d0ceb55a7ca57 100644 (file)
@@ -54,12 +54,8 @@ const char* pakfire_package_get_uuid(struct pakfire_package* pkg);
 void pakfire_package_set_uuid(struct pakfire_package* pkg, const char* uuid);
 const unsigned char* pakfire_package_get_digest(struct pakfire_package* pkg,
        enum pakfire_digest_types* type, size_t* length);
-const char* pakfire_package_get_hexdigest(struct pakfire_package* pkg,
-       enum pakfire_digest_types* type);
 int pakfire_package_set_digest(struct pakfire_package* pkg,
        enum pakfire_digest_types type, const unsigned char* digest, const size_t length);
-int pakfire_package_set_hexdigest(struct pakfire_package* pkg,
-       enum pakfire_digest_types type, const char* hexdigest);
 const char* pakfire_package_get_summary(struct pakfire_package* pkg);
 void pakfire_package_set_summary(struct pakfire_package* pkg, const char* summary);
 const char* pakfire_package_get_description(struct pakfire_package* pkg);
index 7097cc6f9923d101e722b7ba6e6bb62008128ff0..8245d909efc2711a68db44a5c3490544d120619b 100644 (file)
@@ -181,7 +181,6 @@ global:
        pakfire_package_get_filelist;
        pakfire_package_get_filename;
        pakfire_package_get_groups;
-       pakfire_package_get_hexdigest;
        pakfire_package_get_license;
        pakfire_package_get_location;
        pakfire_package_get_installsize;
@@ -223,7 +222,6 @@ global:
        pakfire_package_set_filelist;
        pakfire_package_set_filename;
        pakfire_package_set_groups;
-       pakfire_package_set_hexdigest;
        pakfire_package_set_installsize;
        pakfire_package_set_install_time;
        pakfire_package_set_license;
index 25016a5c3470dd0bfa6852827dbae22f9fbddcd6..f393637f7abc1da0b49f02b08ce03d718ae967ab 100644 (file)
@@ -473,26 +473,6 @@ ERROR:
        return r;
 }
 
-PAKFIRE_EXPORT int pakfire_package_set_hexdigest(struct pakfire_package* pkg,
-               enum pakfire_digest_types type, const char* hexdigest) {
-       const size_t digest_length = pakfire_digest_length(type);
-
-       if (!digest_length) {
-               errno = EINVAL;
-               return 1;
-       }
-
-       // Allocate a buffer for the binary representation of the digest
-       unsigned char* digest = alloca(digest_length);
-       if (!digest)
-               return 1;
-
-       // Convert from hex to binary
-       __pakfire_unhexlify(digest, digest_length, hexdigest);
-
-       return pakfire_package_set_digest(pkg, type, digest);
-}
-
 PAKFIRE_EXPORT const char* pakfire_package_get_summary(struct pakfire_package* pkg) {
        return pakfire_package_get_string(pkg, SOLVABLE_SUMMARY);
 }