Skip to content

add winverify to the scintilla/lexilla x86/x64 libraries#180

Open
desjarlais wants to merge 1 commit intomasterfrom
add-authenticode-verification-with-native-libraries
Open

add winverify to the scintilla/lexilla x86/x64 libraries#180
desjarlais wants to merge 1 commit intomasterfrom
add-authenticode-verification-with-native-libraries

Conversation

@desjarlais
Copy link
Copy Markdown
Owner

Native DLL loaded without integrity verification, scintilla and lexilla are signed, but arm is not so I might need to figure something out there.

@desjarlais desjarlais requested a review from ahmetsait April 18, 2026 04:38
@ahmetsait
Copy link
Copy Markdown
Collaborator

Looks nice! (Will do a through review later.)
I'll ask the maintainer about an officially signed ARM build.

@desjarlais desjarlais self-assigned this Apr 22, 2026
Comment on lines +65 to +68
IntPtr fileInfoPtr = Marshal.AllocHGlobal(Marshal.SizeOf<WINTRUST_FILE_INFO>());
try
{
Marshal.StructureToPtr(fileInfo, fileInfoPtr, false);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything stopping us from simply passing a pointer to the stack variables?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to marshal

https://learn.microsoft.com/en-us/windows/win32/api/wintrust/ns-wintrust-wintrust_file_info

...it converts the managed string into an unmanaged Unicode string pointer in the allocated block. A raw pointer to the stack struct would give the native code a pointer to a managed object reference, not a valid PCWSTR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants