Windows: Code signing with cross-signed certificates

Permit the version of signtool.exe to be specified with
the SIGNTOOL environment variable.

Add the CODESIGN_CROSS_CERT environment variable to
specify the cross-signed certificate to be used

LICENSE MIT

Change-Id: Ib549e31f1f240e0de2cedfabac9bb998ee58a517
Reviewed-on: http://gerrit.openafs.org/825
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
Jeffrey Altman 2009-11-14 16:24:41 -05:00 committed by Jeffrey Altman
parent 7d44a08771
commit 65db615024
2 changed files with 17 additions and 3 deletions

View File

@ -314,9 +314,15 @@ _VC_MANIFEST_EMBED_EXE=
_VC_MANIFEST_EMBED_DLL=
!ENDIF
!IF "$(SIGNTOOL)" == ""
SIGNTOOL=signtool.exe
!ENDIF
!IF DEFINED(CODESIGN_DESC) && DEFINED(CODESIGN_URL) && DEFINED(CODESIGN_TIMESTAMP)
CODESIGN_USERLAND= signtool.exe sign /a /d "$(CODESIGN_DESC)" /du $(CODESIGN_URL) \
/t $(CODESIGN_TIMESTAMP) /v $@
CODESIGN_USERLAND= "$(SIGNTOOL)" sign /a /d "$(CODESIGN_DESC)" /du $(CODESIGN_URL) /t $(CODESIGN_TIMESTAMP) /v $@
!IF "$(CODESIGN_CROSS_CERT)" != ""
CODESIGN_KERNEL= "$(SIGNTOOL)" sign /a /d "$(CODESIGN_DESC)" /du $(CODESIGN_URL) /t $(CODESIGN_TIMESTAMP) /ac "$(CODESIGN_CROSS_CERT)" /v
!ENDIF
!ELSE
CODESIGN_USERLAND=
!ENDIF

View File

@ -321,9 +321,17 @@ _VC_MANIFEST_EMBED_EXE=
_VC_MANIFEST_EMBED_DLL=
!ENDIF
!IF "$(SIGNTOOL)" == ""
SIGNTOOL=signtool.exe
!ENDIF
!IF DEFINED(CODESIGN_DESC) && DEFINED(CODESIGN_URL) && DEFINED(CODESIGN_TIMESTAMP)
CODESIGN_USERLAND= signtool.exe sign /a /d "$(CODESIGN_DESC)" /du $(CODESIGN_URL) \
CODESIGN_USERLAND= $(SIGNTOOL) sign /a /d "$(CODESIGN_DESC)" /du $(CODESIGN_URL) \
/t $(CODESIGN_TIMESTAMP) /v $@
!IF "$(CODESIGN_CROSS_CERT)" != ""
CODESIGN_KERNEL= $(SIGNTOOL) sign /a /d "$(CODESIGN_DESC)" /du $(CODESIGN_URL) \
/t $(CODESIGN_TIMESTAMP) /ac "$(CODESIGN_CROSS_CERT)" /v
!ENDIF
!ELSE
CODESIGN_USERLAND=
!ENDIF