Skip to content

Commit

Permalink
ipxe/ipxe#606: need to embed certificates
Browse files Browse the repository at this point in the history
Relates to: #117

Signed-off-by: Nahum Shalman <[email protected]>
  • Loading branch information
nshalman committed Dec 12, 2023
1 parent db3a248 commit 3fa7d2b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions binary/script/build_and_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ set -uxo pipefail
tracked_files=(
"./script/build_ipxe.sh"
"./script/build_and_pr.sh"
"./script/ipxe-customizations/ca.pem"
"./script/ipxe-customizations/isrgrootx1.pem"
"./script/ipxe-customizations/lets-encrypt-r3.pem"
"./script/ipxe-customizations/console.h"
"./script/ipxe-customizations/console.h"
"./script/ipxe-customizations/isa.h"
"./script/ipxe-customizations/colour.h"
Expand Down
10 changes: 8 additions & 2 deletions binary/script/build_ipxe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

set -eux

#XXX Workaround for https://github.com/ipxe/ipxe/issues/606
CERT=ca.pem,isrgrootx1.pem,lets-encrypt-r3.pem
TRUST=ca.pem,isrgrootx1.pem,lets-encrypt-r3.pem

# build_ipxe will run the make target in the upstream ipxe source
# that will build an ipxe binary.
function build_ipxe() {
Expand All @@ -13,9 +17,9 @@ function build_ipxe() {
local embed_path="$4"

if [ -z "${env_opts}" ]; then
make -C "${ipxe_dir}"/src EMBED="${embed_path}" "${ipxe_bin}"
make -C "${ipxe_dir}"/src EMBED="${embed_path}" CERT="${CERT}" TRUST="${TRUST}" "${ipxe_bin}"
else
make -C "${ipxe_dir}"/src "${env_opts}" EMBED="${embed_path}" "${ipxe_bin}"
make -C "${ipxe_dir}"/src "${env_opts}" EMBED="${embed_path}" CERT="${CERT}" TRUST="${TRUST}" "${ipxe_bin}"
fi
}

Expand Down Expand Up @@ -43,6 +47,8 @@ function copy_common_files() {
cp -a binary/script/ipxe-customizations/common.h "${ipxe_dir}"/src/config/local/
cp -a binary/script/ipxe-customizations/console.h "${ipxe_dir}"/src/config/local/
cp -a binary/script/ipxe-customizations/crypto.h "${ipxe_dir}"/src/config/local/
#XXX Workaround for https://github.com/ipxe/ipxe/issues/606
cp -a binary/script/ipxe-customizations/{ca.pem,isrgrootx1.pem,lets-encrypt-r3.pem} "${ipxe_dir}"/src
}

# copy_custom_files will copy in any custom header files based on a requested ipxe binary.
Expand Down

0 comments on commit 3fa7d2b

Please sign in to comment.