Skip to content

Commit 82e54ea

Browse files
James HobsonTheAssassin
authored andcommitted
Added support for older appimages (untested)
1 parent 77d97ec commit 82e54ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/validate.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ int main(int argc,char **argv) {
121121
exit(1);
122122
}
123123
if (!appimage_get_elf_section_offset_and_length(filename, ".sig_key", &skip_offset_key, &skip_length_key)) {
124-
fprintf(stderr, "Failed to read .sig_key section");
125-
exit(1);
124+
skip_length_key = 0;
125+
skip_offset_key = 0;
126126
}
127127

128128
if(skip_length_sig > 0) {
@@ -134,10 +134,10 @@ int main(int argc,char **argv) {
134134
if(skip_length_key > 0) {
135135
fprintf(stderr, "Skipping ELF section %s with offset %lu, length %lu\n", segment_key_name, skip_offset_key, skip_length_key);
136136
} else {
137-
fprintf(stderr, "ELF section %s not found, is the file signed?\n", segment_key_name);
137+
fprintf(stderr, "ELF section %s not found, assuming older AppImage Standard\n", segment_key_name);
138138
exit(1);
139139
}
140-
if(skip_offset_sig + skip_length_sig != skip_offset_key) {
140+
if(skip_offset_sig + skip_length_sig != skip_offset_key && skip_length_key != 0) {
141141
fprintf(stderr, "Validate only worlds when .sha256_sig and .sig_key are next to one another in the ELF\n");
142142
exit(0);
143143
}

0 commit comments

Comments
 (0)