You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
166 lines
8.5 KiB
166 lines
8.5 KiB
//+-------------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows
|
|
//
|
|
// Copyright (C) Microsoft Corporation, 1997 - 1999
|
|
//
|
|
// File: signcode.rc
|
|
//
|
|
//--------------------------------------------------------------------------
|
|
|
|
#include <windows.h>
|
|
#include <ntverp.h>
|
|
#include "cryptver.h"
|
|
#include "resource.h"
|
|
|
|
#define VER_FILETYPE VFT_APP
|
|
#define VER_FILESUBTYPE VFT2_UNKNOWN
|
|
#define VER_FILEDESCRIPTION_STR "ECM SignCode"
|
|
|
|
#define VER_INTERNALNAME_STR "SIGNCODE.EXE"
|
|
#define VER_ORIGINALFILENAME_STR VER_INTERNALNAME_STR
|
|
|
|
STRINGTABLE DISCARDABLE
|
|
BEGIN
|
|
|
|
IDS_ENFLN "\n"
|
|
IDS_SYNTAX "Usage: SignCode [options] [FileName]\n"
|
|
IDS_OPTIONS "Options: \n"
|
|
IDS_OPTION_SPC "spc"
|
|
IDS_OPTION_SPC_DESC " -spc <file> Spc file containing software publishing certificates\n"
|
|
IDS_OPTION_C "c"
|
|
IDS_OPTION_C_DESC " -c <file> file containing encoded software publishing certificate\n"
|
|
IDS_OPTION_S "s"
|
|
IDS_OPTION_S_DESC " -s <store> Cert store containing certs. Default to my store\n"
|
|
IDS_OPTION_MORE_DESC " Either -%s or -%s should be set for signing\n"
|
|
IDS_OPTION_SP "sp"
|
|
IDS_OPTION_SP_DESC " -sp <policy> Add the certification path (chain) or add the certification\n"
|
|
IDS_OPTION_SP_DESC1 " path excluding the root certificate (spcstore).\n"
|
|
IDS_OPTION_SP_CHAIN "chain"
|
|
IDS_OPTION_SP_SPCSTORE "spcstore"
|
|
IDS_OPTION_R "r"
|
|
IDS_OPTION_R_DESC " -r <location> Location of the cert store in the registry\n"
|
|
IDS_OPTION_MORE_VALUE " <%s|%s>. Default to %s\n"
|
|
IDS_OPTION_AUTH_VALUE " <%s|%s>\n"
|
|
IDS_OPTION_AUTH_VALUE1 " Default to %s \n"
|
|
IDS_OPTION_CN "cn"
|
|
IDS_OPTION_CN_DESC " -cn <name> The common name of the certificate\n"
|
|
IDS_OPTION_SHA1 "sha1"
|
|
IDS_OPTION_SHA1_DESC " -sha1 <thumbPrint> The sha1 hash of the certificate\n"
|
|
IDS_OPTION_V "v"
|
|
IDS_OPTION_V_DESC " -v <pvkFile> Pvk file name containing the private key\n"
|
|
IDS_OPTION_K "k"
|
|
IDS_OPTION_K_DESC " -k <KeyName> Key container name\n"
|
|
IDS_OPTION_N "n"
|
|
IDS_OPTION_N_DESC " -n <name> Text name representing content of the file to be signed\n"
|
|
IDS_OPTION_I "i"
|
|
IDS_OPTION_I_DESC " -i <info> Place to get more info on content (usually a URL)\n"
|
|
IDS_OPTION_P "p"
|
|
IDS_OPTION_P_DESC " -p <provider> Name of the cryptographic provider on the system\n"
|
|
IDS_OPTION_Y "y"
|
|
IDS_OPTION_Y_DESC " -y <type> Cryptographic provider type to use\n"
|
|
IDS_OPTION_KY "ky"
|
|
IDS_OPTION_KY_DESC " -ky <keytype> Key type\n"
|
|
IDS_OPTION_KY_VALUES " <%s|%s|<integer>>\n"
|
|
IDS_OPTION_KY_SIG "signature"
|
|
IDS_OPTION_KY_EXC "exchange"
|
|
IDS_OPTION_AUTH "$"
|
|
IDS_OPTION_AUTH_DESC " -$ <authority> Signing authority of the certificate\n"
|
|
IDS_OPTION_A "a"
|
|
IDS_OPTION_A_DESC " -a <algorithm> Hashing algorithm for signing\n"
|
|
IDS_OPTION_T "t"
|
|
IDS_OPTION_T_DESC " -t <URL> TimeStamp server's http address\n"
|
|
IDS_OPTION_J "j"
|
|
IDS_OPTION_J_DESC " -j <dllName> Name of the dll that provides attributes of the signature\n"
|
|
IDS_OPTION_JP "jp"
|
|
IDS_OPTION_JP_DESC " -jp <param> Parameter to be passed to the dll\n"
|
|
IDS_OPTION_TW "tw"
|
|
IDS_OPTION_TW_DESC " -tw <number> The # of seconds delay between each timestamp. Default to 0\n"
|
|
IDS_OPTION_TR "tr"
|
|
IDS_OPTION_TR_DESC " -tr <number> The # of timestamp trial until succeeds. Default to 1\n"
|
|
IDS_OPTION_X "x"
|
|
IDS_OPTION_X_DESC " -x Do not sign the file. Only Timestamp the file\n"
|
|
IDS_OPTION_H "h"
|
|
IDS_OPTION_H_DESC " -h <ExpectedErrpr> The expected error. e.g. -H0x0 \n"
|
|
IDS_OPTION_TQ "tq"
|
|
IDS_OPTION_TQ_DESC " -tq <file> Timestamp response FileName\n"
|
|
IDS_OPTION_TS "ts"
|
|
IDS_OPTION_TS_DESC " -ts <file> Timestamp request FileName\n"
|
|
IDS_OPTION_INDEX "index"
|
|
IDS_OPTION_INDEX_DESC " -index <number> The index of the signature or timestamp\n"
|
|
IDS_OPTION_TEST "~"
|
|
IDS_SWITCH1 "-"
|
|
IDS_SWITCH2 "/"
|
|
IDS_A_MD5 "md5"
|
|
IDS_A_SHA "sha1"
|
|
IDS_R_CU "currentUser"
|
|
IDS_R_LM "localMachine"
|
|
IDS_AUTHORITY_ID "individual"
|
|
IDS_AUTHORITY_CM "commercial"
|
|
IDS_AUTHORITY_DEFAULT "using certificate's highest capability"
|
|
IDS_ACTION_SIGNCODE "Signcode"
|
|
IDS_ACTION_SIGN "Signing"
|
|
IDS_ACTION_TIMESTAMP "TimeStamping"
|
|
IDS_ACTION_REQUEST "Generating timestamp request"
|
|
IDS_ACTION_RESPONSE "Applying timestamp response"
|
|
IDS_SIGNED "Please make sure the file is signed.\n"
|
|
IDS_RESIGN "Files signed by previous version of the signing tool may need to be resigned.\n"
|
|
IDS_ERROR "Error: %s Failed. Result = %08x, (%d)\n"
|
|
IDS_SUCCEEDED "Succeeded\n"
|
|
IDS_FAILED "Error: %s Failed. Result = %08x, (%d)\n"
|
|
IDS_TEST_SUCCEEDED "Passed successfully: %0x\n"
|
|
IDS_TEST_FAILED "Error: expected return: %0x returned: %0x\n"
|
|
IDS_WARNING "Warning: This file is signed, but not timestamped.\n"
|
|
IDS_ERR_TOO_MANY_PARAM "Error: Too many parameters.\n"
|
|
IDS_ERR_INPUT_INVALID "Error: One or more input parameters are invalid.\n"
|
|
IDS_ERR_RESPONSE_INVALID "Error: Connection timed out, or invalid response from the timestamp server.\n"
|
|
IDS_ERR_NOMATCH "Error: The software publishing certificate and private key do not match or do not contain valid information.\n"
|
|
IDS_ERR_AUTH "Error: The certificate does not have the correct signing authority.\n"
|
|
IDS_ERR_RESIZE "Error: Not enough space to add the timestamp. Please resign the file.\n"
|
|
IDS_ERR_NO_SPC "Error: Enter spc file or a cert store name.\n"
|
|
IDS_ERR_NO_PVK "Error: Enter the pvk file or a key container name.\n"
|
|
IDS_ERR_NO_FILE "Error: Enter file name to sign or timestamp.\n"
|
|
IDS_ERR_ADDR_INVALID "Error: -t specifies invalid address\n"
|
|
IDS_ERR_HTTP "Error: -t has to start with http://\n"
|
|
IDS_ERR_TIME_RESPONSE "Error: -t and -ts can be present at the same time!\n"
|
|
IDS_ERR_SIGN_RESPONSE "Error: -ts and signing can be present at the same time!\n"
|
|
IDS_ERR_BOTH_PVK "Error: -v and -k can not be present at the same time!\n"
|
|
IDS_ERR_BOTH_SPC "Error: -c, -s, -r, -cn, -sha1 and -sp can not mix with -spc, -v, -k, -p, -y, -ky switch!\n"
|
|
IDS_ERR_BOTH_CN_SHA1 "Error: -cn, -c and -sha1 can not be set at the same time!\n"
|
|
IDS_ERR_NO_ALGO "Error: Either md5 or sha1 should be specified for -a option!\n"
|
|
IDS_ERR_NO_AUTH "Error: Either commercial or individual should be specified for signing authority!\n"
|
|
IDS_ERR_NO_REG "Error: Either localMachine or currentUser should be specified for store location!\n"
|
|
IDS_HTTP "http://"
|
|
IDS_ERR_TOO_FEW_PARAM "Error: Too few parameters\n"
|
|
IDS_ERR_NO_POLICY "Error: Either spcstore or chain should be used as policy of adding certificate!\n"
|
|
IDS_ERR_HRPOV_FROM_CERT "Error: Can not locate a private key matching the certificate.\n"
|
|
IDS_ERR_NO_CERT_CHAIN "Error: Can not find a certification path for signing\n"
|
|
IDS_MY "my"
|
|
IDS_CA "ca"
|
|
IDS_ROOT "root"
|
|
IDS_SPC "spc"
|
|
IDS_NULL "\0"
|
|
IDS_PLUS "+"
|
|
IDS_CAPITION "Publisher"
|
|
IDS_TIMESTAMP_TIMES_DELAY "Tried to timestamp %d times with %d seconds of delay between each trial\n"
|
|
IDS_ERR_INVALID_ADDRESS "Error: Invalid timestamp http address\n"
|
|
IDS_ERR_TS_CERT_INVALID "Error: The timestamp server's certificate is invalid for timestamping.\n"
|
|
IDS_STORE_LOCATION_NAME "Error: If -r switch is set, -s should be also set\n"
|
|
IDS_ERR_NO_CERT "Error: There is no valid certificate in the %s cert store\n"
|
|
IDS_ERR_TOO_MANY_CERT "Error: There is more than one valid certificate in the %s store\n"
|
|
IDS_ERR_NO_PROVIDER "Error: Unable to open a CSP provider with the correct private key\n"
|
|
IDS_ERR_NO_CHAINING "Error: Failed to build the certification path as requested\n"
|
|
IDS_ERR_EXPRIED "Error: The certificate used for signing has expired!\n"
|
|
IDS_SIGNER_INDEX "The signature/timestamp is put at index %d.\n"
|
|
IDS_MORE_INFO_1 "Note: To sign with a SPC file, the required options are -spc and -v if\n"
|
|
IDS_MORE_INFO_2 " your private key is in a PVK file. If your private key is in a \n"
|
|
IDS_MORE_INFO_3 " registry key container, then -spc and -k are the required options.\n"
|
|
IDS_ERR_SHA1_HASH "Error: Invalid value for -sha1 option\n"
|
|
END
|
|
|
|
|
|
|
|
|
|
#include <common.ver>
|
|
|
|
|