-
Notifications
You must be signed in to change notification settings - Fork 311
Open
Description
Error
The codesigning tool is throwing an error when running an iOS app on Mac devices with an identity provider (IdP).
The error returned is this:
ValueError: time data 'N/A' does not match format '%Y-%m-%d %H:%M:%S %z'
Cause
The error happens because these devices include a key without an expiration date in their keychain, so the following command
system_profiler SPSmartCardsDataType -xmlReturns an expiration with the value 'N/A':
<dict>
<key>#01</key>
<string>Kind: private ECDSA 256-bit, Certificate: no, Usage: Derive Decrypt Unwrap
Valid from: N/A to: N/A, SSL trust: N/A, X509 trust: N/A
</string>
<key>_name</key>
<string>com.apple.platformsso:BBBBBBBBBBB</string>
</dict>And when the python script tries to parse it, it simply fails:
expiry_date = re.search(r"(?<=to:)(.*?)(?=,)", data, re.DOTALL).group().strip()
expiry_date = datetime.datetime.strptime(expiry_date, "%Y-%m-%d %H:%M:%S %z")oinatzml
Metadata
Metadata
Assignees
Labels
No labels