3 # Consider this file an example.
5 # For Junos this is how we obtain trust anchor .pems
6 # the signing server (http://www.crufty.net/sjg/blog/signing-server.htm)
7 # for each key will provide the appropriate certificate chain on request
9 # force these for Junos
10 #MANIFEST_SKIP_ALWAYS= boot
21 VE_SIGNATURE_EXT_LIST= \
27 .if ${MACHINE} == "host" && ${.CURDIR:T} == "tests"
32 VE_SIGNATURE_EXT_LIST+= \
36 SIGNER ?= ${SB_TOOLS_PATH:U/volume/buildtools/bin}/sign.py
39 SIGN_HOST ?= ${SB_SITE:Usvl}-junos-signer.juniper.net
40 ECDSA_PORT:= ${133%y:L:gmtime}
41 SIGN_ECDSA= ${PYTHON} ${SIGNER} -u ${SIGN_HOST}:${ECDSA_PORT} -h sha256
42 RSA2_PORT:= ${163%y:L:gmtime}
43 SIGN_RSA2= ${PYTHON} ${SIGNER} -u ${SIGN_HOST}:${RSA2_PORT} -h sha256
45 .if !empty(OPENPGP_SIGN_URL)
46 VE_SIGNATURE_LIST+= OPENPGP
47 VE_SIGNATURE_EXT_LIST+= asc
49 SIGN_OPENPGP= ${PYTHON} ${SIGNER:H}/openpgp-sign.py -a -u ${OPENPGP_SIGN_URL}
52 ${SIGN_OPENPGP} -C ${.TARGET}
54 ta_asc.h: ta_openpgp.asc
56 .if ${VE_SELF_TESTS} != "no"
58 vc_openpgp.asc: ta_openpgp.asc
59 ${SIGN_OPENPGP} ${.ALLSRC:M*.asc}
60 mv ta_openpgp.asc.asc ${.TARGET}
62 ta_asc.h: vc_openpgp.asc
67 ${SIGN_RSA2} -C ${.TARGET}
70 ${SIGN_ECDSA} -C ${.TARGET}
72 .if ${VE_SIGNATURE_LIST:tu:MECDSA} != ""
73 # the last cert in the chain is the one we want
74 ta_ec.pem: ecerts.pem _LAST_PEM_USE
76 .if ${VE_SELF_TESTS} != "no"
77 # these are for verification self test
78 vc_ec.pem: ecerts.pem _2ndLAST_PEM_USE
83 .if ${VE_SIGNATURE_LIST:tu:MRSA} != ""
84 ta_rsa.pem: rcerts.pem _LAST_PEM_USE
86 .if ${VE_SELF_TESTS} != "no"
87 vc_rsa.pem: rcerts.pem _2ndLAST_PEM_USE
92 # we take the mtime of this as our baseline time
93 #BUILD_UTC_FILE= ecerts.pem
98 # you need to provide t*.pem or t*.asc files for each trust anchor
99 .if empty(TRUST_ANCHORS)
100 TRUST_ANCHORS!= cd ${.CURDIR} && 'ls' -1 *.pem t*.asc 2> /dev/null
102 .if empty(TRUST_ANCHORS) && ${MK_LOADER_EFI_SECUREBOOT} != "yes"
103 .error Need TRUST_ANCHORS see ${.CURDIR}/README.rst
105 .if ${TRUST_ANCHORS:T:Mt*.pem} != ""
106 ta.h: ${TRUST_ANCHORS:M*.pem}
108 .if ${TRUST_ANCHORS:T:Mt*.asc} != ""
109 VE_SIGNATURE_LIST+= OPENPGP
110 VE_SIGNATURE_EXT_LIST+= asc
111 ta_asc.h: ${TRUST_ANCHORS:M*.asc}
113 # we take the mtime of this as our baseline time
114 BUILD_UTC_FILE?= ${TRUST_ANCHORS:[1]}