|
@@ -608,36 +608,39 @@ CFLAGS_clientcert += $(if $(CERT),-DCERTIFICATE="\"$(CERT_INC)\"")
|
608
|
608
|
|
609
|
609
|
# (Single-element) list of client private keys
|
610
|
610
|
#
|
611
|
|
-KEY_LIST := $(BIN)/.private_key.list
|
612
|
|
-ifeq ($(wildcard $(KEY_LIST)),)
|
613
|
|
-KEY_OLD := <invalid>
|
|
611
|
+ifdef KEY
|
|
612
|
+PRIVKEY := $(KEY) # Maintain backwards compatibility
|
|
613
|
+endif
|
|
614
|
+PRIVKEY_LIST := $(BIN)/.private_key.list
|
|
615
|
+ifeq ($(wildcard $(PRIVKEY_LIST)),)
|
|
616
|
+PRIVKEY_OLD := <invalid>
|
614
|
617
|
else
|
615
|
|
-KEY_OLD := $(shell cat $(KEY_LIST))
|
|
618
|
+PRIVKEY_OLD := $(shell cat $(PRIVKEY_LIST))
|
616
|
619
|
endif
|
617
|
|
-ifneq ($(KEY_OLD),$(KEY))
|
618
|
|
-$(shell $(ECHO) "$(KEY)" > $(KEY_LIST))
|
|
620
|
+ifneq ($(PRIVKEY_OLD),$(PRIVKEY))
|
|
621
|
+$(shell $(ECHO) "$(PRIVKEY)" > $(PRIVKEY_LIST))
|
619
|
622
|
endif
|
620
|
623
|
|
621
|
|
-$(KEY_LIST) :
|
|
624
|
+$(PRIVKEY_LIST) :
|
622
|
625
|
|
623
|
|
-VERYCLEANUP += $(KEY_LIST)
|
|
626
|
+VERYCLEANUP += $(PRIVKEY_LIST)
|
624
|
627
|
|
625
|
628
|
# Embedded client private key
|
626
|
629
|
#
|
627
|
|
-KEY_INC := $(BIN)/.private_key.der
|
|
630
|
+PRIVKEY_INC := $(BIN)/.private_key.der
|
628
|
631
|
|
629
|
|
-ifdef KEY
|
630
|
|
-$(KEY_INC) : $(KEY) $(KEY_LIST)
|
|
632
|
+ifdef PRIVKEY
|
|
633
|
+$(PRIVKEY_INC) : $(PRIVKEY) $(PRIVKEY_LIST)
|
631
|
634
|
$(Q)$(OPENSSL) rsa -in $< -outform DER -out $@
|
632
|
635
|
|
633
|
|
-clientcert_DEPS += $(KEY_INC)
|
|
636
|
+clientcert_DEPS += $(PRIVKEY_INC)
|
634
|
637
|
endif
|
635
|
638
|
|
636
|
|
-CLEANUP += $(KEY_INC)
|
|
639
|
+CLEANUP += $(PRIVKEY_INC)
|
637
|
640
|
|
638
|
|
-clientcert_DEPS += $(KEY_LIST)
|
|
641
|
+clientcert_DEPS += $(PRIVKEY_LIST)
|
639
|
642
|
|
640
|
|
-CFLAGS_clientcert += $(if $(KEY),-DPRIVATE_KEY="\"$(KEY_INC)\"")
|
|
643
|
+CFLAGS_clientcert += $(if $(PRIVKEY),-DPRIVATE_KEY="\"$(PRIVKEY_INC)\"")
|
641
|
644
|
|
642
|
645
|
# These files use .incbin inline assembly to include a binary file.
|
643
|
646
|
# Unfortunately ccache does not detect this dependency and caches
|