Leaked source code of windows server 2003
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

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1997 - 1999
  6. //
  7. // File: signcode.rc
  8. //
  9. //--------------------------------------------------------------------------
  10. #include <windows.h>
  11. #include <ntverp.h>
  12. #include "cryptver.h"
  13. #include "resource.h"
  14. #define VER_FILETYPE VFT_APP
  15. #define VER_FILESUBTYPE VFT2_UNKNOWN
  16. #define VER_FILEDESCRIPTION_STR "ECM SignCode"
  17. #define VER_INTERNALNAME_STR "SIGNCODE.EXE"
  18. #define VER_ORIGINALFILENAME_STR VER_INTERNALNAME_STR
  19. STRINGTABLE DISCARDABLE
  20. BEGIN
  21. IDS_ENFLN "\n"
  22. IDS_SYNTAX "Usage: SignCode [options] [FileName]\n"
  23. IDS_OPTIONS "Options: \n"
  24. IDS_OPTION_SPC "spc"
  25. IDS_OPTION_SPC_DESC " -spc <file> Spc file containing software publishing certificates\n"
  26. IDS_OPTION_C "c"
  27. IDS_OPTION_C_DESC " -c <file> file containing encoded software publishing certificate\n"
  28. IDS_OPTION_S "s"
  29. IDS_OPTION_S_DESC " -s <store> Cert store containing certs. Default to my store\n"
  30. IDS_OPTION_MORE_DESC " Either -%s or -%s should be set for signing\n"
  31. IDS_OPTION_SP "sp"
  32. IDS_OPTION_SP_DESC " -sp <policy> Add the certification path (chain) or add the certification\n"
  33. IDS_OPTION_SP_DESC1 " path excluding the root certificate (spcstore).\n"
  34. IDS_OPTION_SP_CHAIN "chain"
  35. IDS_OPTION_SP_SPCSTORE "spcstore"
  36. IDS_OPTION_R "r"
  37. IDS_OPTION_R_DESC " -r <location> Location of the cert store in the registry\n"
  38. IDS_OPTION_MORE_VALUE " <%s|%s>. Default to %s\n"
  39. IDS_OPTION_AUTH_VALUE " <%s|%s>\n"
  40. IDS_OPTION_AUTH_VALUE1 " Default to %s \n"
  41. IDS_OPTION_CN "cn"
  42. IDS_OPTION_CN_DESC " -cn <name> The common name of the certificate\n"
  43. IDS_OPTION_SHA1 "sha1"
  44. IDS_OPTION_SHA1_DESC " -sha1 <thumbPrint> The sha1 hash of the certificate\n"
  45. IDS_OPTION_V "v"
  46. IDS_OPTION_V_DESC " -v <pvkFile> Pvk file name containing the private key\n"
  47. IDS_OPTION_K "k"
  48. IDS_OPTION_K_DESC " -k <KeyName> Key container name\n"
  49. IDS_OPTION_N "n"
  50. IDS_OPTION_N_DESC " -n <name> Text name representing content of the file to be signed\n"
  51. IDS_OPTION_I "i"
  52. IDS_OPTION_I_DESC " -i <info> Place to get more info on content (usually a URL)\n"
  53. IDS_OPTION_P "p"
  54. IDS_OPTION_P_DESC " -p <provider> Name of the cryptographic provider on the system\n"
  55. IDS_OPTION_Y "y"
  56. IDS_OPTION_Y_DESC " -y <type> Cryptographic provider type to use\n"
  57. IDS_OPTION_KY "ky"
  58. IDS_OPTION_KY_DESC " -ky <keytype> Key type\n"
  59. IDS_OPTION_KY_VALUES " <%s|%s|<integer>>\n"
  60. IDS_OPTION_KY_SIG "signature"
  61. IDS_OPTION_KY_EXC "exchange"
  62. IDS_OPTION_AUTH "$"
  63. IDS_OPTION_AUTH_DESC " -$ <authority> Signing authority of the certificate\n"
  64. IDS_OPTION_A "a"
  65. IDS_OPTION_A_DESC " -a <algorithm> Hashing algorithm for signing\n"
  66. IDS_OPTION_T "t"
  67. IDS_OPTION_T_DESC " -t <URL> TimeStamp server's http address\n"
  68. IDS_OPTION_J "j"
  69. IDS_OPTION_J_DESC " -j <dllName> Name of the dll that provides attributes of the signature\n"
  70. IDS_OPTION_JP "jp"
  71. IDS_OPTION_JP_DESC " -jp <param> Parameter to be passed to the dll\n"
  72. IDS_OPTION_TW "tw"
  73. IDS_OPTION_TW_DESC " -tw <number> The # of seconds delay between each timestamp. Default to 0\n"
  74. IDS_OPTION_TR "tr"
  75. IDS_OPTION_TR_DESC " -tr <number> The # of timestamp trial until succeeds. Default to 1\n"
  76. IDS_OPTION_X "x"
  77. IDS_OPTION_X_DESC " -x Do not sign the file. Only Timestamp the file\n"
  78. IDS_OPTION_H "h"
  79. IDS_OPTION_H_DESC " -h <ExpectedErrpr> The expected error. e.g. -H0x0 \n"
  80. IDS_OPTION_TQ "tq"
  81. IDS_OPTION_TQ_DESC " -tq <file> Timestamp response FileName\n"
  82. IDS_OPTION_TS "ts"
  83. IDS_OPTION_TS_DESC " -ts <file> Timestamp request FileName\n"
  84. IDS_OPTION_INDEX "index"
  85. IDS_OPTION_INDEX_DESC " -index <number> The index of the signature or timestamp\n"
  86. IDS_OPTION_TEST "~"
  87. IDS_SWITCH1 "-"
  88. IDS_SWITCH2 "/"
  89. IDS_A_MD5 "md5"
  90. IDS_A_SHA "sha1"
  91. IDS_R_CU "currentUser"
  92. IDS_R_LM "localMachine"
  93. IDS_AUTHORITY_ID "individual"
  94. IDS_AUTHORITY_CM "commercial"
  95. IDS_AUTHORITY_DEFAULT "using certificate's highest capability"
  96. IDS_ACTION_SIGNCODE "Signcode"
  97. IDS_ACTION_SIGN "Signing"
  98. IDS_ACTION_TIMESTAMP "TimeStamping"
  99. IDS_ACTION_REQUEST "Generating timestamp request"
  100. IDS_ACTION_RESPONSE "Applying timestamp response"
  101. IDS_SIGNED "Please make sure the file is signed.\n"
  102. IDS_RESIGN "Files signed by previous version of the signing tool may need to be resigned.\n"
  103. IDS_ERROR "Error: %s Failed. Result = %08x, (%d)\n"
  104. IDS_SUCCEEDED "Succeeded\n"
  105. IDS_FAILED "Error: %s Failed. Result = %08x, (%d)\n"
  106. IDS_TEST_SUCCEEDED "Passed successfully: %0x\n"
  107. IDS_TEST_FAILED "Error: expected return: %0x returned: %0x\n"
  108. IDS_WARNING "Warning: This file is signed, but not timestamped.\n"
  109. IDS_ERR_TOO_MANY_PARAM "Error: Too many parameters.\n"
  110. IDS_ERR_INPUT_INVALID "Error: One or more input parameters are invalid.\n"
  111. IDS_ERR_RESPONSE_INVALID "Error: Connection timed out, or invalid response from the timestamp server.\n"
  112. IDS_ERR_NOMATCH "Error: The software publishing certificate and private key do not match or do not contain valid information.\n"
  113. IDS_ERR_AUTH "Error: The certificate does not have the correct signing authority.\n"
  114. IDS_ERR_RESIZE "Error: Not enough space to add the timestamp. Please resign the file.\n"
  115. IDS_ERR_NO_SPC "Error: Enter spc file or a cert store name.\n"
  116. IDS_ERR_NO_PVK "Error: Enter the pvk file or a key container name.\n"
  117. IDS_ERR_NO_FILE "Error: Enter file name to sign or timestamp.\n"
  118. IDS_ERR_ADDR_INVALID "Error: -t specifies invalid address\n"
  119. IDS_ERR_HTTP "Error: -t has to start with http://\n"
  120. IDS_ERR_TIME_RESPONSE "Error: -t and -ts can be present at the same time!\n"
  121. IDS_ERR_SIGN_RESPONSE "Error: -ts and signing can be present at the same time!\n"
  122. IDS_ERR_BOTH_PVK "Error: -v and -k can not be present at the same time!\n"
  123. IDS_ERR_BOTH_SPC "Error: -c, -s, -r, -cn, -sha1 and -sp can not mix with -spc, -v, -k, -p, -y, -ky switch!\n"
  124. IDS_ERR_BOTH_CN_SHA1 "Error: -cn, -c and -sha1 can not be set at the same time!\n"
  125. IDS_ERR_NO_ALGO "Error: Either md5 or sha1 should be specified for -a option!\n"
  126. IDS_ERR_NO_AUTH "Error: Either commercial or individual should be specified for signing authority!\n"
  127. IDS_ERR_NO_REG "Error: Either localMachine or currentUser should be specified for store location!\n"
  128. IDS_HTTP "http://"
  129. IDS_ERR_TOO_FEW_PARAM "Error: Too few parameters\n"
  130. IDS_ERR_NO_POLICY "Error: Either spcstore or chain should be used as policy of adding certificate!\n"
  131. IDS_ERR_HRPOV_FROM_CERT "Error: Can not locate a private key matching the certificate.\n"
  132. IDS_ERR_NO_CERT_CHAIN "Error: Can not find a certification path for signing\n"
  133. IDS_MY "my"
  134. IDS_CA "ca"
  135. IDS_ROOT "root"
  136. IDS_SPC "spc"
  137. IDS_NULL "\0"
  138. IDS_PLUS "+"
  139. IDS_CAPITION "Publisher"
  140. IDS_TIMESTAMP_TIMES_DELAY "Tried to timestamp %d times with %d seconds of delay between each trial\n"
  141. IDS_ERR_INVALID_ADDRESS "Error: Invalid timestamp http address\n"
  142. IDS_ERR_TS_CERT_INVALID "Error: The timestamp server's certificate is invalid for timestamping.\n"
  143. IDS_STORE_LOCATION_NAME "Error: If -r switch is set, -s should be also set\n"
  144. IDS_ERR_NO_CERT "Error: There is no valid certificate in the %s cert store\n"
  145. IDS_ERR_TOO_MANY_CERT "Error: There is more than one valid certificate in the %s store\n"
  146. IDS_ERR_NO_PROVIDER "Error: Unable to open a CSP provider with the correct private key\n"
  147. IDS_ERR_NO_CHAINING "Error: Failed to build the certification path as requested\n"
  148. IDS_ERR_EXPRIED "Error: The certificate used for signing has expired!\n"
  149. IDS_SIGNER_INDEX "The signature/timestamp is put at index %d.\n"
  150. IDS_MORE_INFO_1 "Note: To sign with a SPC file, the required options are -spc and -v if\n"
  151. IDS_MORE_INFO_2 " your private key is in a PVK file. If your private key is in a \n"
  152. IDS_MORE_INFO_3 " registry key container, then -spc and -k are the required options.\n"
  153. IDS_ERR_SHA1_HASH "Error: Invalid value for -sha1 option\n"
  154. END
  155. #include <common.ver>