Skip to content

Commit

Permalink
fixup! Add support for password-protected signing key
Browse files Browse the repository at this point in the history
Signed-off-by: jkr0103 <[email protected]>
  • Loading branch information
jkr0103 committed Oct 3, 2023
1 parent 3d2cd72 commit 3d6a456
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions templates/Dockerfile.common.sign.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ FROM {{image}} as unsigned_image
COPY gsc-signer-key.pem /gramine/app_files/gsc-signer-key.pem

ARG passphrase
RUN {% block path %}{% endblock %} gramine-sgx-sign \
ARG passphrase_name="--passphrase"

RUN if [ -z "$passphrase" ]; then \
passphrase_name=""; \
fi; \
{% block path %}{% endblock %} gramine-sgx-sign \
--key /gramine/app_files/gsc-signer-key.pem \
--manifest /gramine/app_files/entrypoint.manifest \
--output /gramine/app_files/entrypoint.manifest.sgx \
--passphrase $passphrase
${passphrase_name} ${passphrase}

# This trick removes all temporary files from the previous commands (including gsc-signer-key.pem
# and passphrase)
Expand Down

0 comments on commit 3d6a456

Please sign in to comment.