Merge branch 'master' of github.com:limelight-stream/limelight-ios

This commit is contained in:
Cameron Gutman
2014-10-18 22:44:02 -04:00
6 changed files with 36 additions and 11 deletions

View File

@@ -88,9 +88,18 @@ MDNSManager* mDNSManager;
mDNSManager = [[MDNSManager alloc] initWithCallback:self];
[mDNSManager searchForHosts];
CryptoManager* cryptMan = [[CryptoManager alloc] init];
[cryptMan getUniqueID];
HttpManager* hMan = [[HttpManager alloc] init];
[hMan saltPIN:[hMan generatePIN]];
NSString* uniqueId = [cryptMan getUniqueID];
[cryptMan generateKeyPairUsingSSl];
NSData* cert = [cryptMan readCertFromFile];
HttpManager* hMan = [[HttpManager alloc] initWithHost:hostAddr uniqueId:uniqueId deviceName:@"roth"];
NSString* PIN = [hMan generatePIN];
NSData* saltedPIN = [hMan saltPIN:PIN];
NSLog(@"PIN: %@, saltedPIN: %@", PIN, saltedPIN);
NSURL* pairUrl = [hMan newPairRequestWithSalt:saltedPIN andCert:cert];
NSURLRequest* pairRequest = [[NSURLRequest alloc] initWithURL:pairUrl];
NSLog(@"making pair request: %@", [pairRequest description]);
NSData* pairData = [NSURLConnection sendSynchronousRequest:pairRequest returningResponse:nil error:nil];
NSLog(@"Pair response: %@", [pairData description]);
}
- (void)updateHosts:(NSArray *)hosts {