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 Jun 8, 2022
1 parent 3bec7f6 commit 2593ab9
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 2593ab9

Please sign in to comment.