You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running both the stand-alone app or embedding the library in another project, it crashes in - (void) connection:(MKConnection *)conn trustFailureInCertificateChain:(NSArray *)chain when it tries to take the first object of [conn peerCertificates] as the function returns nil. I peeped inside the function:
// Returns the certificates of the peer of connection. That is, the server's certificate chain.
As a matter of fact it was due to an attempt to remove the warning on kCFStreamPropertySSLPeerCertificates. Apparently the value I used was not the correct one. What should one employ instead.
When running both the stand-alone app or embedding the library in another project, it crashes in - (void) connection:(MKConnection *)conn trustFailureInCertificateChain:(NSArray *)chain when it tries to take the first object of [conn peerCertificates] as the function returns nil. I peeped inside the function:
// Returns the certificates of the peer of connection. That is, the server's certificate chain.
(NSArray *) peerCertificates {
if (_peerCertificates != nil) {
return _peerCertificates;
}
NSArray *secCerts = (NSArray *) CFWriteStreamCopyProperty((CFWriteStreamRef) _outputStream, kCFStreamSocketSecurityLevelSSLv3);
_peerCertificates = [[NSMutableArray alloc] initWithCapacity:[secCerts count]];
[secCerts enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
NSData *data = (NSData *) SecCertificateCopyData((SecCertificateRef)obj);
[_peerCertificates addObject:[MKCertificate certificateWithCertificate:data privateKey:nil]];
[data release];
}];
[secCerts release];
return _peerCertificates;
}
and I noticed it not even entered the enumeration.
The text was updated successfully, but these errors were encountered: