Author: tfaber
Date: Tue Oct 6 00:22:07 2015
New Revision: 69459
URL:
http://svn.reactos.org/svn/reactos?rev=69459&view=rev
Log:
[RAPPS]
- Add support for SHA-1 validation of completed downloads. Patch by Ismael Ferreras
Morezuelas
CORE-10301 #resolve
Modified:
trunk/reactos/base/applications/rapps/CMakeLists.txt
trunk/reactos/base/applications/rapps/available.c
trunk/reactos/base/applications/rapps/lang/bg-BG.rc
trunk/reactos/base/applications/rapps/lang/cs-CZ.rc
trunk/reactos/base/applications/rapps/lang/de-DE.rc
trunk/reactos/base/applications/rapps/lang/en-US.rc
trunk/reactos/base/applications/rapps/lang/es-ES.rc
trunk/reactos/base/applications/rapps/lang/fr-FR.rc
trunk/reactos/base/applications/rapps/lang/he-IL.rc
trunk/reactos/base/applications/rapps/lang/it-IT.rc
trunk/reactos/base/applications/rapps/lang/ja-JP.rc
trunk/reactos/base/applications/rapps/lang/no-NO.rc
trunk/reactos/base/applications/rapps/lang/pl-PL.rc
trunk/reactos/base/applications/rapps/lang/pt-BR.rc
trunk/reactos/base/applications/rapps/lang/ro-RO.rc
trunk/reactos/base/applications/rapps/lang/ru-RU.rc
trunk/reactos/base/applications/rapps/lang/sk-SK.rc
trunk/reactos/base/applications/rapps/lang/sq-AL.rc
trunk/reactos/base/applications/rapps/lang/sv-SE.rc
trunk/reactos/base/applications/rapps/lang/tr-TR.rc
trunk/reactos/base/applications/rapps/lang/uk-UA.rc
trunk/reactos/base/applications/rapps/lang/zh-CN.rc
trunk/reactos/base/applications/rapps/lang/zh-TW.rc
trunk/reactos/base/applications/rapps/loaddlg.c
trunk/reactos/base/applications/rapps/misc.c
trunk/reactos/base/applications/rapps/rapps.h
trunk/reactos/base/applications/rapps/resource.h
trunk/reactos/media/rapps/7zip.txt
trunk/reactos/media/rapps/ccleaner.txt
trunk/reactos/media/rapps/dosbox.txt
trunk/reactos/media/rapps/firefox28.txt
trunk/reactos/media/rapps/inkscape.txt
Modified: trunk/reactos/base/applications/rapps/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/CM…
==============================================================================
--- trunk/reactos/base/applications/rapps/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/CMakeLists.txt [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -1,3 +1,5 @@
+
+include_directories(${REACTOS_SOURCE_DIR}/lib/cryptlib)
list(APPEND SOURCE
aboutdlg.c
Modified: trunk/reactos/base/applications/rapps/available.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/av…
==============================================================================
--- trunk/reactos/base/applications/rapps/available.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/available.c [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -260,6 +260,7 @@
GET_STRING2(L"Size", Info->szSize);
GET_STRING2(L"URLSite", Info->szUrlSite);
GET_STRING2(L"CDPath", Info->szCDPath);
+ GET_STRING2(L"SHA1", Info->szSHA1);
}
if (!lpEnumProc(Info))
Modified: trunk/reactos/base/applications/rapps/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/bg-BG.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/bg-BG.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -202,4 +202,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "ÐÑемаÑ
ванеÑо на данниÑе за пÑиложениеÑо Ð¾Ñ ÑегиÑÑÑÑа е
невÑзможно!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/cs-CZ.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/cs-CZ.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -203,4 +203,6 @@
IDS_UNABLE_TO_DOWNLOAD "Soubor se nepodaÅilo stáhnout! Adresa
nenalezena!"
IDS_UNABLE_TO_REMOVE "NepodaÅilo se odstranit data programu z registru!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/de-DE.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -198,4 +198,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Konnte die Daten nicht aus der Registry löschen!"
IDS_CERT_DOES_NOT_MATCH "Ãberprüfung des SSL-Zertifikats
fehlgeschlagen."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/en-US.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -198,4 +198,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Unable to remove data on the program from the
registry!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/es-ES.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -201,4 +201,6 @@
IDS_UNABLE_TO_DOWNLOAD "No se pudo descargar el paquete. No se ha encontrado la
dirección de Internet."
IDS_UNABLE_TO_REMOVE "No se pudieron borrar del Registro los datos de
instalación del programa."
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verificando integridad del paquete..."
+ IDS_INTEG_CHECK_FAIL "El paquete no ha pasado la comprobación de integridad,
puede haber sido alterado o estar corrupto. No se recomienda ejecutarlo."
+END
Modified: trunk/reactos/base/applications/rapps/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/fr-FR.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -198,4 +198,6 @@
IDS_UNABLE_TO_DOWNLOAD "Impossible de télécharger le paquet : adresse non
trouvée !"
IDS_UNABLE_TO_REMOVE "Impossible de supprimer les données du programme du
registre !"
IDS_CERT_DOES_NOT_MATCH "Vérification du certificat SSL échouée."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/he-IL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/he-IL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/he-IL.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -200,4 +200,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Unable to remove data on the program from the
registry!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/it-IT.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -198,4 +198,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Impossibile cancellare i dati dal registry!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/ja-JP.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -198,4 +198,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE
"ã¬ã¸ã¹ããªãããã®ããã°ã©ã ã«é¢ãããã¼ã¿ãåé¤ã§ãã¾ãã!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/no-NO.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -198,4 +198,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Unable to remove data on the program from the
registry!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/pl-PL.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -206,4 +206,6 @@
IDS_UNABLE_TO_DOWNLOAD "Nie można pobraÄ pakietu! Nie znaleziono
adresu!"
IDS_UNABLE_TO_REMOVE "Nie można byÅo usunÄ
Ä wpisu z rejestru!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/pt-BR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/pt-BR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/pt-BR.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -200,4 +200,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Não foi possÃvel remover as informações do programa do
registro!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/ro-RO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/ro-RO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/ro-RO.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -204,4 +204,6 @@
IDS_UNABLE_TO_DOWNLOAD "Pachetul nu poate fi descÄrcat! Adresa nu este
gÄsitÄ!"
IDS_UNABLE_TO_REMOVE "Nu se pot elimina datele din registru pentru acest
program!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/ru-RU.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -198,4 +198,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Ðе ÑдалоÑÑ ÑдалиÑÑ Ð´Ð°Ð½Ð½Ñе о
пÑогÑамме из ÑееÑÑÑа!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/sk-SK.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/sk-SK.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -203,4 +203,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Nie je možné odstrániť z registrov údaje o
programe!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/sq-AL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/sq-AL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/sq-AL.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -202,4 +202,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "E pamundur te fshihen informacionet e programit nga
regjistri!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/sv-SE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/sv-SE.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -205,4 +205,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Det gick ej att ta bort programmets data från
registret!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/tr-TR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/tr-TR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/tr-TR.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -200,4 +200,6 @@
IDS_UNABLE_TO_DOWNLOAD "Paket indirilemez! Adres bulunamadı!"
IDS_UNABLE_TO_REMOVE "Ä°zlencenin giriÅi deÄer defterinden silinemiyor."
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/uk-UA.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -206,4 +206,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "Ðе вдалоÑÑ Ð²Ð¸Ð´Ð°Ð»Ð¸Ñи Ð´Ð°Ð½Ñ Ð¿Ñо
пÑогÑÐ°Ð¼Ñ Ð· ÑеÑÑÑÑÑ!"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/zh-CN.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/zh-CN.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/zh-CN.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -201,4 +201,6 @@
IDS_UNABLE_TO_DOWNLOAD "æ æ³ä¸è½½è¯¥è½¯ä»¶å
ï¼æ¾ä¸å°ç½ç»çå°å ï¼"
IDS_UNABLE_TO_REMOVE "æ æ³ä»æ³¨å表å é¤è¯¥ç¨åºçæ°æ®ï¼"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/lang/zh-TW.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/la…
==============================================================================
--- trunk/reactos/base/applications/rapps/lang/zh-TW.rc [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/lang/zh-TW.rc [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -200,4 +200,6 @@
IDS_UNABLE_TO_DOWNLOAD "Unable to download the package! Address not
found!"
IDS_UNABLE_TO_REMOVE "ç¡æ³å¾ç»éæªåªé¤è©²ç¨å¼çè³æï¼"
IDS_CERT_DOES_NOT_MATCH "SSL certificate verification failed."
-END
+ IDS_INTEG_CHECK_TITLE "Verifying package integrity..."
+ IDS_INTEG_CHECK_FAIL "The package did not pass the integrity check, it may have
been corrupted or tampered with during downloading. Running the software is not
recommended."
+END
Modified: trunk/reactos/base/applications/rapps/loaddlg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/lo…
==============================================================================
--- trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/loaddlg.c [iso-8859-1] Tue Oct 6 00:22:07 2015
@@ -355,6 +355,14 @@
if (FAILED(StringCbCatNW(path, sizeof(path), p + 1, filenameLength)))
goto end;
+ /* is the file already there? let's avoid having to download it */
+ if (!bCab && AppInfo->szSHA1[0] != 0 && GetFileAttributesW(path)
!= INVALID_FILE_ATTRIBUTES)
+ {
+ /* only open it in case of total correctness */
+ if (VerifyInteg(AppInfo->szSHA1, path))
+ goto run;
+ }
+
/* create an async download context for it */
bTempfile = TRUE;
dl = CreateDl(Context, &bCancelled);
@@ -462,8 +470,32 @@
if (bCancelled)
goto end;
+ /* if this thing isn't a RAPPS update and it has a SHA-1 checksum
+ verify its integrity by using the native advapi32.A_SHA1 functions */
+ if (!bCab && AppInfo->szSHA1[0] != 0)
+ {
+ WCHAR szMsgText[MAX_STR_LEN];
+
+ /* change a few strings in the download dialog to reflect the verification
process */
+ LoadStringW(hInst, IDS_INTEG_CHECK_TITLE, szMsgText, _countof(szMsgText));
+
+ SetWindowText(Dlg, szMsgText);
+ SendMessageW(GetDlgItem(Dlg, IDC_DOWNLOAD_STATUS), WM_SETTEXT, 0, (LPARAM)path);
+
+ /* this may take a while, depending on the file size */
+ if (!VerifyInteg(AppInfo->szSHA1, path))
+ {
+ if (!LoadStringW(hInst, IDS_INTEG_CHECK_FAIL, szMsgText,
_countof(szMsgText)))
+ goto end;
+
+ MessageBoxW(Dlg, szMsgText, NULL, MB_OK | MB_ICONERROR);
+ goto end;
+ }
+ }
+
ShowWindow(Dlg, SW_HIDE);
+run:
/* run it */
if (!bCab)
ShellExecuteW( NULL, L"open", path, NULL, NULL, SW_SHOWNORMAL );
Modified: trunk/reactos/base/applications/rapps/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/mi…
==============================================================================
--- trunk/reactos/base/applications/rapps/misc.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/misc.c [iso-8859-1] Tue Oct 6 00:22:07 2015
@@ -8,6 +8,7 @@
*/
#include "rapps.h"
+#include <sha1.h>
/* SESSION Operation */
#define EXTRACT_FILLFILELIST 0x00000001
@@ -495,4 +496,62 @@
RtlUnicodeStringToInteger(&BufferW, 0, &Result);
return Result;
-}
+}
+
+BOOL VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName)
+{
+ BOOL ret = FALSE;
+ const unsigned char *file_map;
+ HANDLE file, map;
+
+ ULONG sha[5];
+ WCHAR buf[40 + 1];
+ SHA_CTX ctx;
+
+ LARGE_INTEGER size;
+ UINT i;
+
+ /* first off, does it exist at all? */
+ file = CreateFileW(lpFileName, GENERIC_READ, 0, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_READONLY, NULL);
+
+ if (file == INVALID_HANDLE_VALUE)
+ return FALSE;
+
+ /* let's grab the actual file size to organize the mmap'ing rounds */
+ GetFileSizeEx(file, &size);
+
+ /* retrieve a handle to map the file contents to memory */
+ map = CreateFileMappingW(file, NULL, PAGE_READONLY, 0, 0, NULL);
+ if (!map)
+ goto cleanup;
+
+ /* initialize the SHA-1 context */
+ A_SHAInit(&ctx);
+
+ /* map that thing in address space */
+ file_map = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
+ if (!file_map)
+ goto cleanup;
+
+ /* feed the data to the cookie monster */
+ A_SHAUpdate(&ctx, file_map, size.LowPart);
+
+ /* cool, we don't need this anymore */
+ UnmapViewOfFile(file_map);
+
+ /* we're done, compute the final hash */
+ A_SHAFinal(&ctx, sha);
+
+ for (i = 0; i < sizeof(sha); i++)
+ swprintf(buf + 2 * i, L"%02x", ((unsigned char *)sha)[i]);
+
+ /* does the resulting SHA1 match with the provided one? */
+ if (!_wcsicmp(buf, lpSHA1Hash))
+ ret = TRUE;
+
+cleanup:
+ CloseHandle(map);
+ CloseHandle(file);
+
+ return ret;
+}
Modified: trunk/reactos/base/applications/rapps/rapps.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/ra…
==============================================================================
--- trunk/reactos/base/applications/rapps/rapps.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/rapps.h [iso-8859-1] Tue Oct 6 00:22:07 2015
@@ -91,10 +91,12 @@
FILETIME ftCacheStamp;
LIST_ENTRY List;
- /* optional integrity checks */
- BYTE MD5Checksum[16];
+ /* optional integrity checks (SHA-1 digests are 160 bit = 40 characters in hex string
form) */
+ WCHAR szSHA1[40 + 1];
} APPLICATION_INFO, *PAPPLICATION_INFO;
+
+BOOL VerifyInteg(LPCWSTR lpSHA1Hash, LPCWSTR lpFileName);
typedef struct
{
Modified: trunk/reactos/base/applications/rapps/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/re…
==============================================================================
--- trunk/reactos/base/applications/rapps/resource.h [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/resource.h [iso-8859-1] Tue Oct 6 00:22:07
2015
@@ -97,6 +97,8 @@
#define IDS_UNABLE_TO_REMOVE 118
#define IDS_UNABLE_TO_DOWNLOAD 119
#define IDS_CERT_DOES_NOT_MATCH 120
+#define IDS_INTEG_CHECK_TITLE 121
+#define IDS_INTEG_CHECK_FAIL 122
/* Tooltips */
#define IDS_TOOLTIP_INSTALL 200
Modified: trunk/reactos/media/rapps/7zip.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/rapps/7zip.txt?rev=6…
==============================================================================
--- trunk/reactos/media/rapps/7zip.txt [iso-8859-1] (original)
+++ trunk/reactos/media/rapps/7zip.txt [iso-8859-1] Tue Oct 6 00:22:07 2015
@@ -11,6 +11,7 @@
Category = 12
URLSite =
http://www.7-zip.org/
URLDownload =
http://www.7-zip.org/a/7z1505.exe
+SHA1 = ece8bbd4c8903095d44e99196219c953a1d47bfd
CDPath = none
[Section.0407]
Modified: trunk/reactos/media/rapps/ccleaner.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/rapps/ccleaner.txt?r…
==============================================================================
--- trunk/reactos/media/rapps/ccleaner.txt [iso-8859-1] (original)
+++ trunk/reactos/media/rapps/ccleaner.txt [iso-8859-1] Tue Oct 6 00:22:07 2015
@@ -12,6 +12,7 @@
Category = 12
URLSite =
http://www.piriform.com/ccleaner
URLDownload =
http://download.piriform.com/ccsetup508.exe
+SHA1 = aa7affcbdaf13c3872f32eaccf3befb92fd0fa80
CDPath = none
[Section.0407]
Modified: trunk/reactos/media/rapps/dosbox.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/rapps/dosbox.txt?rev…
==============================================================================
--- trunk/reactos/media/rapps/dosbox.txt [iso-8859-1] (original)
+++ trunk/reactos/media/rapps/dosbox.txt [iso-8859-1] Tue Oct 6 00:22:07 2015
@@ -11,6 +11,7 @@
Category = 15
URLSite =
http://www.dosbox.com/
URLDownload =
http://download.sourceforge.net/project/dosbox/dosbox/0.74/DOSBox0.74-win32…
+SHA1 = b4d671ed3fc1fc36aaf8abc1341d2ddaaafa8f88
CDPath = none
[Section.0407]
Modified: trunk/reactos/media/rapps/firefox28.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/rapps/firefox28.txt?…
==============================================================================
--- trunk/reactos/media/rapps/firefox28.txt [iso-8859-1] (original)
+++ trunk/reactos/media/rapps/firefox28.txt [iso-8859-1] Tue Oct 6 00:22:07 2015
@@ -11,6 +11,7 @@
Category = 5
URLSite =
http://www.mozilla.org/en-US/
URLDownload =
http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/28.0/win32/en-US/Fi…
+SHA1 = 0154f7a38acad5c186c000533f992830e509abee
CDPath = none
[Section.0405]
Modified: trunk/reactos/media/rapps/inkscape.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/rapps/inkscape.txt?r…
==============================================================================
--- trunk/reactos/media/rapps/inkscape.txt [iso-8859-1] (original)
+++ trunk/reactos/media/rapps/inkscape.txt [iso-8859-1] Tue Oct 6 00:22:07 2015
@@ -12,6 +12,7 @@
Category = 3
URLSite =
http://www.inkscape.org/
URLDownload =
https://inkscape.global.ssl.fastly.net/media/resources/file/Inkscape-0.91-1…
+SHA1 = aac506f8a71c943d89a27a38970733a8bc6f9b32
CDPath = none
[Section.0407]