Matlab compiler : how do I sign an app with a certificate I supply?

25 次查看(过去 30 天)
I work in an organisation that is fairly concerned about malicious applications running on internal networks. For that reason, nothing can be installed on a Windows machine unless it's either on a whitelist of known 'major' apps, or contains a certificate that is recognised.
I want to use Matlab compiler to generate an application that can run on production Windows machines without the interactive Matlab environment.
How do I tell Matlab compiler to sign the application it produces, and point it at a certificate that I can supply?
This is standard functionality in things like Visual Studio, see https://msdn.microsoft.com/en-us/library/br230260.aspx

采纳的回答

William Smith
William Smith 2018-3-26
编辑:William Smith 2018-3-26
Answer : there doesn't seem to be any way to do this in Matlab compiler (at least, as of 2016b which I'm currently using).
I worked around it by using the Windows program signtool.exe (part of Visual Studio) explicitly after compilation.
Something like this:
% compile
mcc('-m','-R','-startmsg', ...
'-d', outfolder, ...
'-v',source,'-o',strrep(target, '.exe', '')); % compile. mcc wants the target name without the .exe
% sign
system([ 'signtool.exe sign /f MYCERT.pfx /p MYPASS /t http://timestamp.verisign.com/scripts/timstamp.dll /v ' outfolder '/' target ], '-echo');

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by