aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/reference/modules/codesign-module.qdoc16
-rw-r--r--share/qbs/modules/codesign/codesign.js4
-rw-r--r--share/qbs/modules/codesign/signtool.qbs7
-rw-r--r--tests/auto/blackbox/testdata-windows/codesign/codesign.qbs2
4 files changed, 29 insertions, 0 deletions
diff --git a/doc/reference/modules/codesign-module.qdoc b/doc/reference/modules/codesign-module.qdoc
index d0aba4688..45e247a6a 100644
--- a/doc/reference/modules/codesign-module.qdoc
+++ b/doc/reference/modules/codesign-module.qdoc
@@ -343,6 +343,22 @@
*/
/*!
+ \qmlproperty string codesign::timestampAlgorithm
+
+ Specifies the default timestamp algorithm used together with the
+ \c signingTimestamp property. The possible values are \c sha1, \c sha256.
+
+ \note If this value is not set, then the default sha1 algorithm
+ will be used.
+
+ \since Qbs 1.19.2
+
+ \defaultvalue \c undefined
+
+ \windowsproperty
+*/
+
+/*!
\qmlproperty string codesign::certificatePath
Specifies the full path to the signing certificate file (*.pfx).
diff --git a/share/qbs/modules/codesign/codesign.js b/share/qbs/modules/codesign/codesign.js
index 8159a77bc..10fa7575f 100644
--- a/share/qbs/modules/codesign/codesign.js
+++ b/share/qbs/modules/codesign/codesign.js
@@ -443,6 +443,10 @@ function prepareSigntool(project, product, inputs, outputs, input, output) {
if (signingTimestamp)
args.push("/tr", signingTimestamp);
+ var timestampAlgorithm = product.codesign.timestampAlgorithm;
+ if (timestampAlgorithm)
+ args.push("/td", timestampAlgorithm);
+
var certificatePath = product.codesign.certificatePath;
if (certificatePath)
args.push("/f", certificatePath);
diff --git a/share/qbs/modules/codesign/signtool.qbs b/share/qbs/modules/codesign/signtool.qbs
index 02a2c978e..d0dda3a31 100644
--- a/share/qbs/modules/codesign/signtool.qbs
+++ b/share/qbs/modules/codesign/signtool.qbs
@@ -70,6 +70,13 @@ CodeSignModule {
allowedValues: ["sha1", "sha256", "sha384", "sha512"]
}
+ property string timestampAlgorithm
+ PropertyOptions {
+ name: "timestampAlgorithm"
+ description: "Name of the timestamp algorithm."
+ allowedValues: ["sha1", "sha256"]
+ }
+
property path certificatePath
PropertyOptions {
name: "certificatePath"
diff --git a/tests/auto/blackbox/testdata-windows/codesign/codesign.qbs b/tests/auto/blackbox/testdata-windows/codesign/codesign.qbs
index ef6447ab7..f9f49e636 100644
--- a/tests/auto/blackbox/testdata-windows/codesign/codesign.qbs
+++ b/tests/auto/blackbox/testdata-windows/codesign/codesign.qbs
@@ -14,6 +14,7 @@ Project {
codesign.hashAlgorithm: project.hashAlgorithm
codesign.subjectName: project.subjectName
codesign.signingTimestamp: project.signingTimestamp
+ codesign.timestampAlgorithm: "sha256"
install: true
installDir: ""
property bool dummy: {
@@ -31,6 +32,7 @@ Project {
codesign.hashAlgorithm: project.hashAlgorithm
codesign.subjectName: project.subjectName
codesign.signingTimestamp: project.signingTimestamp
+ codesign.timestampAlgorithm: "sha256"
install: true
installDir: ""
property bool dummy: {