Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a bug in the manifest parser which caused it to ignore manifests that were signed by a windows-build of PGP.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:696668aa4ec88213cafad039707f49a698e2136c
User & Date: drh 2010-11-08 20:01:41
References
2010-11-09
08:38 New ticket [1318677c] Configuration pull does not work. artifact: fe3e98d4 user: anonymous
2010-11-08
20:07
Merge in the [696668aa4ec88213c] fix, which is necessary to successfully export the Fossil self-hosting repository. check-in: 95f709cd user: drh tags: experimental
Context
2010-11-09
08:59
fix [e49f245975f89a8a9c006ec224eed48c8ad77593] by adding -nocgi option check-in: 1b883d49 user: ron tags: trunk
01:06
Merge from trunk + minor changes to update.c to work with new . return from file_tree_name for fossil root. check-in: a9407bc8 user: venkat tags: venks-emacs
2010-11-08
20:01
Fix a bug in the manifest parser which caused it to ignore manifests that were signed by a windows-build of PGP. check-in: 696668aa user: drh tags: trunk
19:31
Fix an inintiialized variable in the previous check-in. check-in: d8935a89 user: drh tags: trunk
Changes

Changes to src/manifest.c.

182
183
184
185
186
187
188











189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
  memset(&manifestCache, 0, sizeof(manifestCache));
}

#ifdef FOSSIL_DONT_VERIFY_MANIFEST_MD5SUM
# define md5sum_init(X)
# define md5sum_step_text(X,Y)
#endif












/*
** Remove the PGP signature from the artifact, if there is one.
*/
static void remove_pgp_signature(char **pz, int *pn){
  char *z = *pz;
  int n = *pn;
  int i;
  if( memcmp(z, "-----BEGIN PGP SIGNED MESSAGE-----", 34)!=0 ) return;
  for(i=34; i<n && (z[i-1]!='\n' || z[i-2]!='\n'); i++){}
  if( i>=n ) return;
  z += i;
  n -= i;
  *pz = z;
  for(i=n-1; i>=0; i--){
    if( z[i]=='\n' && memcmp(&z[i],"\n-----BEGIN PGP SIGNATURE-", 25)==0 ){
      n = i+1;







>
>
>
>
>
>
>
>
>
>
>









|







182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
  memset(&manifestCache, 0, sizeof(manifestCache));
}

#ifdef FOSSIL_DONT_VERIFY_MANIFEST_MD5SUM
# define md5sum_init(X)
# define md5sum_step_text(X,Y)
#endif

/*
** Return true if z points to the first character after a blank line.
** Tolerate either \r\n or \n line endings.
*/
static int after_blank_line(const char *z){
  if( z[-1]!='\n' ) return 0;
  if( z[-2]=='\n' ) return 1;
  if( z[-2]=='\r' && z[-3]=='\n' ) return 1;
  return 0;
}

/*
** Remove the PGP signature from the artifact, if there is one.
*/
static void remove_pgp_signature(char **pz, int *pn){
  char *z = *pz;
  int n = *pn;
  int i;
  if( memcmp(z, "-----BEGIN PGP SIGNED MESSAGE-----", 34)!=0 ) return;
  for(i=34; i<n && !after_blank_line(z+i); i++){}
  if( i>=n ) return;
  z += i;
  n -= i;
  *pz = z;
  for(i=n-1; i>=0; i--){
    if( z[i]=='\n' && memcmp(&z[i],"\n-----BEGIN PGP SIGNATURE-", 25)==0 ){
      n = i+1;