Skip to content

Commit

Permalink
+ добавлен проект sign для подготовки цифровой подписи для тестирован…
Browse files Browse the repository at this point in the history
…ия пакета (#3)
  • Loading branch information
sergey-s-betke committed Aug 5, 2016
1 parent bff36d6 commit 6abd1cc
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions signing/sign-basic.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
ifndef MAKE_SIGNING_SIGN_BASIC_DIR
MAKE_SIGNING_SIGN_BASIC_DIR := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
ITG_MAKEUTILS_DIR ?= $(realpath $(MAKE_SIGNING_SIGN_BASIC_DIR)/..)

include $(ITG_MAKEUTILS_DIR)/common.mk
include $(ITG_MAKEUTILS_DIR)/signing/sign.mk

CODE_SIGNING_CERTIFICATE_DIR = certificate
CODE_SIGNING_CERTIFICATE := $(CODE_SIGNING_CERTIFICATE_DIR)/cert.pfx
export CODE_SIGNING_CERTIFICATE_PFX := $(basename $(CODE_SIGNING_CERTIFICATE)).pfx
$(eval $(call pushArtifactTarget,CODE_SIGNING_CERTIFICATE_PFX))
export CODE_SIGNING_CERTIFICATE_PVK := $(basename $(CODE_SIGNING_CERTIFICATE)).pvk
$(eval $(call pushArtifactTarget,CODE_SIGNING_CERTIFICATE_PVK))
CODE_SIGNING_CERTIFICATE_PVK_PEM := $(basename $(CODE_SIGNING_CERTIFICATE)).key.pem
export CODE_SIGNING_CERTIFICATE_SPC := $(basename $(CODE_SIGNING_CERTIFICATE)).spc
$(eval $(call pushArtifactTarget,CODE_SIGNING_CERTIFICATE_SPC))
CODE_SIGNING_CERTIFICATE_SPC_PEM := $(basename $(CODE_SIGNING_CERTIFICATE)).spc.pem
export CODE_SIGNING_CERTIFICATE_TARGETS := $(CODE_SIGNING_CERTIFICATE_PFX) $(CODE_SIGNING_CERTIFICATE_PVK) $(CODE_SIGNING_CERTIFICATE_SPC)
$(eval $(call pushArtifactTarget,CODE_SIGNING_CERTIFICATE_TARGETS))

ifneq ($(CI),True)

$(eval $(call exportCodeSigningCertificate,$(CODE_SIGNING_CERTIFICATE_PFX)))

endif

.PHONY: pfx
pfx: $(CODE_SIGNING_CERTIFICATE_PFX)

$(eval $(call exportCertificateKeyFromPfx2Pem,$(CODE_SIGNING_CERTIFICATE_PVK_PEM),$(CODE_SIGNING_CERTIFICATE_PFX)))
$(eval $(call convertCertificateKeyPem2Pvk,$(CODE_SIGNING_CERTIFICATE_PVK),$(CODE_SIGNING_CERTIFICATE_PVK_PEM)))
.PHONY: pvk
pvk: $(CODE_SIGNING_CERTIFICATE_PVK)

$(eval $(call exportCertificateFromPfx2Pem,$(CODE_SIGNING_CERTIFICATE_SPC_PEM),$(CODE_SIGNING_CERTIFICATE_PFX)))
$(eval $(call convertCertificatePem2Spc,$(CODE_SIGNING_CERTIFICATE_SPC),$(CODE_SIGNING_CERTIFICATE_SPC_PEM)))
.PHONY: spc
spc: $(CODE_SIGNING_CERTIFICATE_SPC)

clean::
rm -rf $(CODE_SIGNING_CERTIFICATE_DIR)

endif

0 comments on commit 6abd1cc

Please sign in to comment.