@@ -28,69 +28,72 @@ cp -r . ../src/github.com/cloudflare/cloudflared
2828cd ../src/github.com/cloudflare/cloudflared
2929GOCACHE=" $PWD /../../../../" GOPATH=" $PWD /../../../../" CGO_ENABLED=1 make cloudflared
3030
31- # Add code signing private key to the key chain
32- if [[ -n " ${CFD_CODE_SIGN_KEY:- } " ]]; then
33- if [[ -n " ${CFD_CODE_SIGN_PASS:- } " ]]; then
34- # write private key to disk and then import it keychain
35- echo -n -e ${CFD_CODE_SIGN_KEY} | base64 -D > ${CODE_SIGN_PRIV}
36- security import ${CODE_SIGN_PRIV} -A -P " ${CFD_CODE_SIGN_PASS} "
37- rm ${CODE_SIGN_PRIV}
38- fi
39- fi
40-
41- # Add code signing certificate to the key chain
42- if [[ -n " ${CFD_CODE_SIGN_CERT:- } " ]]; then
43- # write certificate to disk and then import it keychain
44- echo -n -e ${CFD_CODE_SIGN_CERT} | base64 -D > ${CODE_SIGN_CERT}
45- security import ${CODE_SIGN_CERT}
46- rm ${CODE_SIGN_CERT}
47- fi
48-
49- # Add package signing private key to the key chain
50- if [[ -n " ${CFD_INSTALLER_KEY:- } " ]]; then
51- if [[ -n " ${CFD_INSTALLER_PASS:- } " ]]; then
52- # write private key to disk and then import it into the keychain
53- echo -n -e ${CFD_INSTALLER_KEY} | base64 -D > ${INSTALLER_PRIV}
54- security import ${INSTALLER_PRIV} -A -P " ${CFD_INSTALLER_PASS} "
55- rm ${INSTALLER_PRIV}
56- fi
57- fi
58-
59- # Add package signing certificate to the key chain
60- if [[ -n " ${CFD_INSTALLER_CERT:- } " ]]; then
61- # write certificate to disk and then import it keychain
62- echo -n -e ${CFD_INSTALLER_CERT} | base64 -D > ${INSTALLER_CERT}
63- security import ${INSTALLER_CERT}
64- rm ${INSTALLER_CERT}
65- fi
66-
67- # get the code signing certificate name
68- if [[ -n " ${CFD_CODE_SIGN_NAME:- } " ]]; then
69- CODE_SIGN_NAME=" ${CFD_CODE_SIGN_NAME} "
70- else
71- if [[ -n " $( security find-identity -v | cut -d' "' -f 2 -s | grep " Developer ID Application:" ) " ]]; then
72- CODE_SIGN_NAME=$( echo " something else" | grep " Developer ID Application:" )
73- else
74- CODE_SIGN_NAME=" "
75- fi
76- fi
77-
78- # get the package signing certificate name
79- if [[ -n " ${CFD_INSTALLER_NAME:- } " ]]; then
80- PKG_SIGN_NAME=" ${CFD_INSTALLER_NAME} "
81- else
82- if [[ -n " $( security find-identity -v | cut -d' "' -f 2 -s | grep " Developer ID Installer:" ) " ]]; then
83- PKG_SIGN_NAME=$( security find-identity -v | cut -d' "' -f 2 -s | grep " Developer ID Installer:" )
84- else
85- PKG_SIGN_NAME=" "
86- fi
87-
88- fi
89-
90- # sign the cloudflared binary
91- if [[ -n " ${CODE_SIGN_NAME:- } " ]]; then
92- codesign -s " ${CODE_SIGN_NAME} " -f -v --timestamp --options runtime ${BINARY_NAME}
93- fi
31+ # TODO: AUTH-2653 - The CFD_CODE_SIGN_KEY and CFD_INSTALLER_KEY are "doubly" gpg encrypted.
32+ # this needs to be fixed, but I don't have access to the keys to do it.
33+ # The private keys are on from Dane's laptop
34+
35+ # # Add code signing private key to the key chain
36+ # if [[ -n "${CFD_CODE_SIGN_KEY:-}" ]]; then
37+ # if [[ -n "${CFD_CODE_SIGN_PASS:-}" ]]; then
38+ # # write private key to disk and then import it keychain
39+ # echo -n -e ${CFD_CODE_SIGN_KEY} | base64 -D > ${CODE_SIGN_PRIV}
40+ # security import ${CODE_SIGN_PRIV} -A -P "${CFD_CODE_SIGN_PASS}"
41+ # rm ${CODE_SIGN_PRIV}
42+ # fi
43+ # fi
44+
45+ # # Add code signing certificate to the key chain
46+ # if [[ -n "${CFD_CODE_SIGN_CERT:-}" ]]; then
47+ # # write certificate to disk and then import it keychain
48+ # echo -n -e ${CFD_CODE_SIGN_CERT} | base64 -D > ${CODE_SIGN_CERT}
49+ # security import ${CODE_SIGN_CERT}
50+ # rm ${CODE_SIGN_CERT}
51+ # fi
52+
53+ # # Add package signing private key to the key chain
54+ # if [[ -n "${CFD_INSTALLER_KEY:-}" ]]; then
55+ # if [[ -n "${CFD_INSTALLER_PASS:-}" ]]; then
56+ # # write private key to disk and then import it into the keychain
57+ # echo -n -e ${CFD_INSTALLER_KEY} | base64 -D > ${INSTALLER_PRIV}
58+ # security import ${INSTALLER_PRIV} -A -P "${CFD_INSTALLER_PASS}"
59+ # rm ${INSTALLER_PRIV}
60+ # fi
61+ # fi
62+
63+ # # Add package signing certificate to the key chain
64+ # if [[ -n "${CFD_INSTALLER_CERT:-}" ]]; then
65+ # # write certificate to disk and then import it keychain
66+ # echo -n -e ${CFD_INSTALLER_CERT} | base64 -D > ${INSTALLER_CERT}
67+ # security import ${INSTALLER_CERT}
68+ # rm ${INSTALLER_CERT}
69+ # fi
70+
71+ # # get the code signing certificate name
72+ # if [[ -n "${CFD_CODE_SIGN_NAME:-}" ]]; then
73+ # CODE_SIGN_NAME="${CFD_CODE_SIGN_NAME}"
74+ # else
75+ # if [[ -n "$(security find-identity -v | cut -d'"' -f 2 -s | grep "Developer ID Application:")" ]]; then
76+ # CODE_SIGN_NAME=$(security find-identity -v | cut -d'"' -f 2 -s | grep "Developer ID Application:")
77+ # else
78+ # CODE_SIGN_NAME=""
79+ # fi
80+ # fi
81+
82+ # # get the package signing certificate name
83+ # if [[ -n "${CFD_INSTALLER_NAME:-}" ]]; then
84+ # PKG_SIGN_NAME="${CFD_INSTALLER_NAME}"
85+ # else
86+ # if [[ -n "$(security find-identity -v | cut -d'"' -f 2 -s | grep "Developer ID Installer:")" ]]; then
87+ # PKG_SIGN_NAME=$(security find-identity -v | cut -d'"' -f 2 -s | grep "Developer ID Installer:")
88+ # else
89+ # PKG_SIGN_NAME=""
90+ # fi
91+ # fi
92+
93+ # # sign the cloudflared binary
94+ # if [[ -n "${CODE_SIGN_NAME:-}" ]]; then
95+ # codesign -s "${CODE_SIGN_NAME}" -f -v --timestamp --options runtime ${BINARY_NAME}
96+ # fi
9497
9598
9699# creating build directory
0 commit comments