File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,6 @@ extern NSString * _Nonnull const MSID_FLIGHT_IGNORE_COOKIES_IN_DUNA_RESUME;
230230 */
231231extern NSString * _Nonnull const MSID_FLIGHT_DISABLE_REMOVE_ACCOUNT_ARTIFACTS;
232232
233- extern NSString * _Nonnull const MSID_FLIGHT_DISABLE_QUERYING_STK ;
233+ extern NSString * _Nonnull const MSID_FLIGHT_ENABLE_QUERYING_STK ;
234234
235235#define METHODANDLINE [NSString stringWithFormat: @" %s [Line %d ]" , __PRETTY_FUNCTION__, __LINE__]
Original file line number Diff line number Diff line change 9494// Making the flight string short to avoid legacy broker url size limit
9595NSString *const MSID_FLIGHT_DISABLE_REMOVE_ACCOUNT_ARTIFACTS = @" disable_rm_metadata" ;
9696
97- NSString *const MSID_FLIGHT_DISABLE_QUERYING_STK = @" disable_querying_stk " ;
97+ NSString *const MSID_FLIGHT_ENABLE_QUERYING_STK = @" enable_querying_stk " ;
9898
9999
100100#define METHODANDLINE [NSString stringWithFormat: @" %s [Line %d ]" , __PRETTY_FUNCTION__, __LINE__]
Original file line number Diff line number Diff line change @@ -383,13 +383,16 @@ + (MSIDWPJKeyPairWithCert *)getWPJKeysWithTenantId:(__unused NSString *)tenantId
383383 defaultKeys.keyChainVersion = MSIDWPJKeychainAccessGroupV2;
384384 MSID_LOG_WITH_CTX (MSIDLogLevelInfo, context, @" Returning EC private device key from default registration." );
385385#if TARGET_OS_IPHONE
386- bool isQueryingDisabledViaFlight = [MSIDFlightManager.sharedInstance boolForKey: MSID_FLIGHT_DISABLE_QUERYING_STK];
387- // Query the session transport key only for iOS.
388- // 1P apps use transport key to decrypt ECDH JWE responses when redeeming bound regular refresh tokens
389- id keyType = privateKeyAttributes[(__bridge id )kSecAttrKeyType ];
390- if (!isQueryingDisabledViaFlight && keyType && [keyType isEqual: (__bridge id )kSecAttrKeyTypeECSECPrimeRandom ])
386+ bool isQueryingEnabledViaFlight = [MSIDFlightManager.sharedInstance boolForKey: MSID_FLIGHT_ENABLE_QUERYING_STK];
387+ if (isQueryingEnabledViaFlight)
391388 {
392- [defaultKeys initializePrivateTransportKeyRef: [self getSessionTransportKeyRefFromSecureEnclaveForTenantId: tenantId context: context]];
389+ // Query the session transport key only for iOS.
390+ // 1P apps use transport key to decrypt ECDH JWE responses when redeeming bound regular refresh tokens
391+ id keyType = privateKeyAttributes[(__bridge id )kSecAttrKeyType ];
392+ if (keyType && [keyType isEqual: (__bridge id )kSecAttrKeyTypeECSECPrimeRandom ])
393+ {
394+ [defaultKeys initializePrivateTransportKeyRef: [self getSessionTransportKeyRefFromSecureEnclaveForTenantId: tenantId context: context]];
395+ }
393396 }
394397#endif
395398 return defaultKeys;
You can’t perform that action at this time.
0 commit comments