Login | ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/filter_foundry/trunk/make_win.c
(Generate patch)

Comparing trunk/make_win.c (file contents):
Revision 356 by daniel-marschall, Tue Sep 14 12:23:27 2021 UTC vs.
Revision 357 by daniel-marschall, Sat Oct 16 18:45:48 2021 UTC

# Line 24 | Line 24
24  
25   #include "file_compat.h"
26   #include "compat_string.h"
27 + #include "compat_win.h"
28   #include "versioninfo_modify_win.h"
29   #include "version.h"
30  
# Line 608 | Line 609 | Boolean extract_file(LPCTSTR lpType, LPC
609          }
610   }
611  
612 + BOOL StripAuthenticode(const char* pszFileName) {
613 +        HANDLE hFile = CreateFile(pszFileName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, OPEN_EXISTING, 0, NULL);
614 +        if (hFile == INVALID_HANDLE_VALUE) return FALSE;
615 +        if (!_ImageRemoveCertificate(hFile, 0)) return FALSE;
616 +        CloseHandle(hFile);
617 +        return TRUE;
618 + }
619 +
620   OSErr do_make_standalone(char* dstname, int bits) {
621          Boolean res;
622          char err[MAX_PATH + 200];
# Line 620 | Line 629 | OSErr do_make_standalone(char* dstname,
629                          sprintf(err, "Could not create %d bit standalone plugin (doresources failed).", bits);
630                          alertuser(_strdup(&err[0]), _strdup(""));
631                  }
632 +
633 +                // In case we did digitally sign the FilterFoundry plugin (which is currently not the case though),
634 +                // we must now remove the signature, because the embedding of parameter data has invalidated it.
635 +                StripAuthenticode(dstname);
636          }
637          else {
638                  // If you see this error, please make sure that you have called foundry_3264_mixer to include the 32/64 plugins as resource!

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines