Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native executables created with dart2native do not support signing #39106

mit-mit opened this issue Oct 25, 2019 · 2 comments


Copy link

@mit-mit mit-mit commented Oct 25, 2019

The executables created with bin/dart2native use a format that as discussed in the original issue is not compatible with signing tools such as codesign and signtool.


This comment has been minimized.

Copy link

@anaisbetts anaisbetts commented Nov 6, 2019

Confirmed this on Windows 10 - signing a binary with signtool on Windows will cause it (strangely enough) to act like dart.exe

C:\Users\ana\code> cat .\test.dart
main() {
        print("Hello world!");

C:\Users\ana\code> dart2native -k exe -o test.exe .\test.dart
Generated: c:\users\ana\code\test.exe
C:\Users\ana\code> .\test.exe
Hello world!

C:\Users\ana\code>signtool.exe sign /f mycert.pfx /p sekritPassword .\test.exe
Done Adding Additional Store
Successfully signed: .\test.exe

C:\Users\ana\code> .\test.exe
Usage: dart [<vm-flags>] <dart-script-file> [<script-arguments>]

Executes the Dart script <dart-script-file> with the given list of <script-arguments>.

Common VM flags:
  Enable assert statements.
--help or -h
  Display this message (add -v or --verbose for information about
  all VM options).
--package-root=<path> or -p<path>
  Where to find packages, that is, "package:..." imports.

This comment has been minimized.

Copy link

@knopp knopp commented Nov 12, 2019

Are there any plans of addressing this? Distributing binaries on Mac and Windows that are not codesigned is not feasible (on Windows you will not get through smart screen, on Mac since Catalina you need hardened runtime and notarization, before catalina there's gatekeeper).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.