Re: [PATCH opkg] libopkg: move file size check after checksum verification

2020-08-24 Thread Baptiste Jonglez
On 24-08-20, Henrique de Moraes Holschuh wrote: > On 24/08/2020 09:01, Baptiste Jonglez wrote: > > On 24-08-20, Henrique de Moraes Holschuh wrote: > > > On 24/08/2020 07:53, Baptiste Jonglez wrote: > > > > It is more user-friendly to tell the user that the checksum is wrong, so > > > > move the fil

Re: [PATCH opkg] libopkg: move file size check after checksum verification

2020-08-24 Thread Henrique de Moraes Holschuh
On 24/08/2020 09:01, Baptiste Jonglez wrote: On 24-08-20, Henrique de Moraes Holschuh wrote: On 24/08/2020 07:53, Baptiste Jonglez wrote: It is more user-friendly to tell the user that the checksum is wrong, so move the file size check at the end. It is also far more expensive in the failure

Re: [PATCH opkg] libopkg: move file size check after checksum verification

2020-08-24 Thread Baptiste Jonglez
On 24-08-20, Henrique de Moraes Holschuh wrote: > On 24/08/2020 07:53, Baptiste Jonglez wrote: > > The file size check was added in cb6640381808dd ("libopkg: check for file > > size mismatches"). Its purpose is to provide an additional line of > > defense against hash collisions. > > > > It is mo

Re: [PATCH opkg] libopkg: move file size check after checksum verification

2020-08-24 Thread Henrique de Moraes Holschuh
On 24/08/2020 07:53, Baptiste Jonglez wrote: The file size check was added in cb6640381808dd ("libopkg: check for file size mismatches"). Its purpose is to provide an additional line of defense against hash collisions. It is more user-friendly to tell the user that the checksum is wrong, so mov

[PATCH opkg] libopkg: move file size check after checksum verification

2020-08-24 Thread Baptiste Jonglez
From: Baptiste Jonglez The file size check was added in cb6640381808dd ("libopkg: check for file size mismatches"). Its purpose is to provide an additional line of defense against hash collisions. It is more user-friendly to tell the user that the checksum is wrong, so move the file size check