// Import certificate from server
SUPLoginCertificate *lc = [cs getSignedCertificateFromServer:@"<ServerName>\\ssotest" withServerPassword:@"s1s2o3T4" withCertPassword:@"password"];
[[LogInfo sharedInstance] testPassed:@"SAPSSOCertTest" :@"GetCertificateFromServer"];
NSLog(@"Imported certificate from server: subjectCN = %@",lc.subjectCN);
// Attach certificate to sync profile
sp.certificate = lc;
[lc release];
// If package requires login first, use beginOnlineLogin API
// which takes no parameters
while ([SUPApplication connectionStatus] != SUPConnectionStatus_CONNECTED) {
NSLog(@"waiting to connect...");
sleep(2);
}
[CrmDatabase beginOnlineLogin];