File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed
.github/actions/configure-keystore Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -138,17 +138,27 @@ runs:
138138 fi
139139
140140 ### DEBUGGING
141- P12_CERT_SUBJECT=$(openssl pkcs12 -in "$CERT_PATH" -nokeys -passin pass:"$CERT_PW" \
142- | openssl x509 -noout -subject | sed 's/^subject= //')
143-
144- echo "🔑 Imported cert subject: $P12_CERT_SUBJECT"
145-
146- if [[ "$PROFILE_CERT_SUBJECT" == "$P12_CERT_SUBJECT" ]]; then
147- echo "✅ Profile certificate matches imported .p12"
141+ # Fingerprint of cert from provisioning profile
142+ TMP_PROFILE_PLIST="$RUNNER_TEMP/profile.plist"
143+ security cms -D -i "$PROFILE_PATH" -o "$TMP_PROFILE_PLIST"
144+ PROFILE_FP=$(plutil -extract DeveloperCertificates.0 raw -o - profile.plist \
145+ | base64 -D \
146+ | openssl x509 -inform DER -noout -fingerprint -sha1 | cut -d'=' -f2)
147+
148+ # Fingerprint of cert from .p12
149+ P12_FP=$(openssl pkcs12 -in "$CERT_PATH" -nokeys -passin pass:"$CERT_PW" \
150+ | openssl x509 -noout -fingerprint -sha1 | cut -d'=' -f2)
151+
152+ echo "Profile fingerprint: $PROFILE_FP"
153+ echo "P12 fingerprint: $P12_FP"
154+
155+ if [[ "$PROFILE_FP" == "$P12_FP" ]]; then
156+ echo "✅ Certificates match"
148157 else
149- echo "❌ Mismatch: profile cert does not match imported .p12 "
158+ echo "❌ Certificates do not match"
150159 fi
151160
161+
152162 ### END DEBUGGING
153163
154164
You can’t perform that action at this time.
0 commit comments