canAuthenticateAgainstProtectionSpace
(のデリゲートコールバックNSURLConnection
)の既知の値に対して公開鍵をチェックするように求められました
これは私がこれまでに持っているものです:
- (BOOL)connection:(NSURLConnection *)connection
canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace
{
SecKeyRef publicKey = SecTrustCopyPublicKey([protectionSpace serverTrust]);
NSLog(@"%@",SecTrustCopyPublicKey([protectionSpace serverTrust]));
return YES;
}
公開鍵を既知の値と比較するにはどうすればよいですか?
NSLogは以下を生成します:<SecKeyRef: 0x687c000>
これは有用な変化ではありません。