Skip to content

Commit

Permalink
Ignore expired identities for Darwin codesigning. (#19330)
Browse files Browse the repository at this point in the history
Fixes #19327
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Nov 29, 2023
1 parent 983b555 commit 9729912
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/all-clusters-app/linux/entitlements/codesign.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def get_identity():
"No valid identity has been found. Application will run without entitlements.")
exit(0)

identity = re.search(r'\b[0-9a-fA-F]{40}\b', command_result)
command_result = command_result.replace("\\n", "\n")
identity = re.search(r'\b[0-9a-fA-F]{40}\b(?![^\n]*\(CSSMERR_TP_CERT_EXPIRED\))', command_result)
if identity is None:
print(
"No valid identity has been found. Application will run without entitlements.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def get_identity():
"No valid identity has been found. Application will run without entitlements.")
exit(0)

identity = re.search(r'\b[0-9a-fA-F]{40}\b', command_result)
command_result = command_result.replace("\\n", "\n")
identity = re.search(r'\b[0-9a-fA-F]{40}\b(?![^\n]*\(CSSMERR_TP_CERT_EXPIRED\))', command_result)
if identity is None:
print(
"No valid identity has been found. Application will run without entitlements.")
Expand Down
3 changes: 2 additions & 1 deletion examples/darwin-framework-tool/entitlements/codesign.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def get_identity():
"No valid identity has been found. Application will run without entitlements.")
exit(0)

identity = re.search(r'\b[0-9a-fA-F]{40}\b', command_result)
command_result = command_result.replace("\\n", "\n")
identity = re.search(r'\b[0-9a-fA-F]{40}\b(?![^\n]*\(CSSMERR_TP_CERT_EXPIRED\))', command_result)
if identity is None:
print(
"No valid identity has been found. Application will run without entitlements.")
Expand Down

0 comments on commit 9729912

Please sign in to comment.