Skip to content

Commit ef7f10e

Browse files
author
“sahmad154”
committed
Fix PKCS#11 mTLS: Export server ICA to shared volume for CA bundle
- Copy Test-RDK-server-ICA to shared volume during cert initialization - Makes server ICA available for ssa-cpc ci-setup-environment.sh - Enables combined CA bundle creation with all intermediate CAs - Required for full PKCS#11 mTLS certificate validation
1 parent 75cf872 commit ef7f10e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

native-platform/certs.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,20 @@ if getent ahosts "$MOCKXCONF_HOST" >/dev/null 2>&1; then
4343
echo "[certs] Waiting for server certificates..."
4444
done
4545

46-
# Copy individual server CA certificates to system trust store
46+
# Copy root CA to system trust store
4747
cp "$SHARED_CERTS_DIR/server/root_ca.pem" ${SYSTEM_TRUST_STORE}/mock-xconf-root-ca.pem
48-
cp "$SHARED_CERTS_DIR/server/intermediate_ca.pem" ${SYSTEM_TRUST_STORE}/mock-xconf-intermediate-ca.pem
49-
chmod 644 ${SYSTEM_TRUST_STORE}/mock-xconf-*.pem
48+
chmod 644 ${SYSTEM_TRUST_STORE}/mock-xconf-root-ca.pem
49+
50+
# Copy server ICA to shared location for ci-setup-environment.sh to use
51+
mkdir -p /mnt/L2_CONTAINER_SHARED_VOLUME/certs
52+
cp "$SHARED_CERTS_DIR/server/intermediate_ca.pem" /mnt/L2_CONTAINER_SHARED_VOLUME/certs/Test-RDK-server-ICA.pem
53+
echo "[certs] Server ICA copied to shared volume for CA bundle creation during build"
5054

5155
# Cleanup shared server certs after import
5256
rm -f "$SHARED_CERTS_DIR/server/root_ca.pem" \
5357
"$SHARED_CERTS_DIR/server/intermediate_ca.pem"
5458

55-
# Update CA certificates
56-
echo "mock-xconf-root-ca.pem" >> /etc/ca-certificates.conf || true
57-
echo "mock-xconf-intermediate-ca.pem" >> /etc/ca-certificates.conf || true
58-
update-ca-certificates --fresh
59+
echo "[certs] Server CA certificates imported"
5960
else
6061
echo "[certs] mock-xconf not resolvable (${MOCKXCONF_HOST}); skipping server CA import"
6162
fi

0 commit comments

Comments
 (0)