From 29b3b9d76a8d6b9af6d6465a9f501c2e5066bea0 Mon Sep 17 00:00:00 2001 From: ticktock35 Date: Tue, 27 Oct 2009 08:45:12 -0400 Subject: Add sha256 ckecksums to okpg Thanks to Camille Moncelier http://groups.google.com/group/opkg-devel/browse_thread/thread/78a2eb328da0ef73?utoken=pV1Kli0AAADKDldt5ZXsDDLs9sWCpWZI0mClVcTs45ANzZ7C9NH-1YGBxa5Bow63PTuzFmQCb1c Here is a patch which adds sha256 checksum checking to Opkg. More Opkg patches will follow shortly (x509 and smime signature support, libcurl client/server authentication) I hope these patch will be useful and finds their ways into okpg Camille Moncelier http://devlife.org/ git-svn-id: http://opkg.googlecode.com/svn/trunk@220 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/opkg.c') diff --git a/libopkg/opkg.c b/libopkg/opkg.c index 4799dc1..a20023e 100644 --- a/libopkg/opkg.c +++ b/libopkg/opkg.c @@ -531,6 +531,7 @@ opkg_install_package (opkg_t *opkg, const char *package_name, opkg_progress_call case OPKG_INSTALL_ERR_ALREADY_INSTALLED: return OPKG_PACKAGE_ALREADY_INSTALLED; case OPKG_INSTALL_ERR_SIGNATURE: return OPKG_GPG_ERROR; case OPKG_INSTALL_ERR_MD5: return OPKG_MD5_ERROR; + case OPKG_INSTALL_ERR_SHA256: return OPKG_SHA256_ERROR; default: return OPKG_UNKNOWN_ERROR; } } @@ -670,6 +671,7 @@ opkg_upgrade_package (opkg_t *opkg, const char *package_name, opkg_progress_call case OPKG_INSTALL_ERR_ALREADY_INSTALLED: return OPKG_PACKAGE_ALREADY_INSTALLED; case OPKG_INSTALL_ERR_SIGNATURE: return OPKG_GPG_ERROR; case OPKG_INSTALL_ERR_MD5: return OPKG_MD5_ERROR; + case OPKG_INSTALL_ERR_SHA256: return OPKG_SHA256_ERROR; default: return OPKG_UNKNOWN_ERROR; } } -- cgit v0.9.1