summaryrefslogtreecommitdiffstats
path: root/src/plugins/bearer/corewlan
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2016-06-29 16:33:21 -0700
committerTimur Pocheptsov <timur.pocheptsov@theqtcompany.com>2016-07-11 11:30:56 +0000
commitd737a8ed54dea6d7e2b030cf5f955f2ea010d94b (patch)
tree0e3fdcee4a7964862b26ddbc76465be39e025163 /src/plugins/bearer/corewlan
parent2e176e3d10535e4fdaa6ecc919538f66f4a2930d (diff)
QCoreWlanEngine: Remove calls to deprecated API in macOS
Change-Id: I606c865e980b8ab8a8027c4b6d322c0bbd05c992 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
Diffstat (limited to 'src/plugins/bearer/corewlan')
-rw-r--r--src/plugins/bearer/corewlan/qcorewlanengine.mm20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/plugins/bearer/corewlan/qcorewlanengine.mm b/src/plugins/bearer/corewlan/qcorewlanengine.mm
index 52e76219e6..7ce5f28f99 100644
--- a/src/plugins/bearer/corewlan/qcorewlanengine.mm
+++ b/src/plugins/bearer/corewlan/qcorewlanengine.mm
@@ -502,27 +502,27 @@ void QCoreWlanEngine::connectToId(const QString &id)
if(!err) {
for (CWNetwork *apNetwork in scanSet) {
- CFDataRef ssidData = (CFDataRef)[apNetwork ssidData];
+ NSData *ssidData = [apNetwork ssidData];
bool result = false;
SecIdentityRef identity = 0;
// Check first whether we require IEEE 802.1X authentication for the wanted SSID
- if (CWKeychainCopyEAPIdentity(ssidData, &identity) == errSecSuccess) {
- CFStringRef username = 0;
- CFStringRef password = 0;
- if (CWKeychainCopyEAPUsernameAndPassword(ssidData, &username, &password) == errSecSuccess) {
+ if (CWKeychainCopyWiFiEAPIdentity(kCWKeychainDomainSystem, ssidData, &identity) == errSecSuccess) {
+ NSString *username = nil;
+ NSString *password = nil;
+ if (CWKeychainFindWiFiEAPUsernameAndPassword(kCWKeychainDomainSystem, ssidData, &username, &password) == errSecSuccess) {
result = [wifiInterface associateToEnterpriseNetwork:apNetwork
identity:identity username:(NSString *)username password:(NSString *)password
error:&err];
- CFRelease(username);
- CFRelease(password);
+ [username release];
+ [password release];
}
CFRelease(identity);
} else {
- CFStringRef password = 0;
- if (CWKeychainCopyPassword(ssidData, &password) == errSecSuccess) {
+ NSString *password = nil;
+ if (CWKeychainFindWiFiPassword(kCWKeychainDomainSystem, ssidData, &password) == errSecSuccess) {
result = [wifiInterface associateToNetwork:apNetwork password:(NSString *)password error:&err];
- CFRelease(password);
+ [password release];
}
}