GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Two — Language Overview (continued)
Overview
The ScriptSign function takes a script file or resource file and adds a digital signature using the default code signing certificate for the system.
Syntax/Parameters
Syntax
int = ScriptSign ( string filename, [string permissions] );
Parameters
filename
A string containing a qualified filename. The script must have full read/write access to the file.
permissions‡
An optional string containing security permissions for the file. If omitted, the signed script can perform any function as allowed for the user on the machine executing the script.
Return Value
Returns an int as ERROR_NONE or a formatted error code on failure. The formatted error code has additional bits set for the area of failure. These are as follows:
SDK Definition | Code/Bits | Description | |||
SCRIPT_SIGN_ALREADY_SIGNED | 0x00100000 | Error Opening Certificate Store | |||
SCRIPT_SIGN_CERTIFICATE_STORE | 0x00200000 | Error Opening Certificate Store | |||
SCRIPT_SIGN_CERTIFICATE_TYPE | 0x00300000 | Error No Appropriate Type | |||
SCRIPT_SIGN_SIGNING | 0x00400000 | Error Signing the Message (script) | |||
SCRIPT_SIGN_WRITING | 0x00500000 | Error Writing the Script File |
Remarks
The ScriptSign function scans the certificate store for the computer and selects the first certificate that has the code signing attribute set. The signature is appended to the end of the script as a series of comments. To resign a script, the existing signature must be manually removed.
If a script is required to be signed in order to run, all included files must also be independently signed. To avoid tampering, many OEM applications that require digitally signed scripts will ungracefully fail when encountering a file with a bad certificate.
If the script has already been signed, the function will fail.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.