Use DER format when creating platform credential. (#161)

This commit is contained in:
busaboy1340 2019-06-18 13:00:49 -04:00 committed by GitHub
parent a00be77d5c
commit 2329d725e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ function InitTpm2Emulator {
# EK and PC Certificate
ek_cert_der="/HIRS/.ci/setup/certs/ek_cert.der"
platform_cert="platformAttributeCertificate.pem"
platform_cert="platformAttributeCertificate.der"
echo "Creating Platform Cert for Container."
PC_DIR=/var/hirs/pc_generation
@ -62,7 +62,7 @@ function InitTpm2Emulator {
/opt/paccor/scripts/referenceoptions.sh > $PC_DIR/optionsFile
/opt/paccor/scripts/otherextensions.sh > $PC_DIR/extensionsFile
/opt/paccor/bin/observer -c $PC_DIR/componentsFile -p $PC_DIR/optionsFile -e $ek_cert_der -f $PC_DIR/observerFile
/opt/paccor/bin/signer -o $PC_DIR/observerFile -x $PC_DIR/extensionsFile -b 20180101 -a 20280101 -N $RANDOM -k /HIRS/.ci/setup/certs/ca.key -P /HIRS/.ci/setup/certs/ca.crt --pem -f $PC_DIR/$platform_cert
/opt/paccor/bin/signer -o $PC_DIR/observerFile -x $PC_DIR/extensionsFile -b 20180101 -a 20280101 -N $RANDOM -k /HIRS/.ci/setup/certs/ca.key -P /HIRS/.ci/setup/certs/ca.crt -f $PC_DIR/$platform_cert
if tpm2_nvlist | grep -q 0x1c00002; then
echo "Released NVRAM for EK."