Custom server certificate validation

75 views
Skip to first unread message

Bart Whiteley

unread,
Feb 23, 2011, 12:23:02 PM2/23/11
to asihttp...@googlegroups.com
I have a need to implement my own custom validation of server certificates.

This was brought up previously here:
http://groups.google.com/group/asihttprequest/browse_thread/thread/8a8943c1220e5380/d88e15a2d965c6f2

An implementation was attempted here:
https://github.com/sixten/asi-http-request/commit/c4f1c1485943e2c2d15df2e8cd88c08bf1b0fcc4

The comments at the bottom of that patch sum up the issues.

The challenge is to handle an event after the SSL handshake has
occurred (so that we have the server certificate), but before the
client sends the first HTTP request.
A discussion in the Apple developer forums suggests that we need to
handle the event NSStreamEventHasSpaceAvailable (or
kCFStreamEventCanAcceptBytes) on our output stream.
https://devforums.apple.com/thread/76373

Can someone point me in the right direction to begin implementing this
for ASIHTTPRequest?

Sixten

unread,
Feb 23, 2011, 12:44:49 PM2/23/11
to ASIHTTPRequest
On Feb 23, 12:23 pm, Bart Whiteley <bwhite...@gmail.com> wrote:
> I have a need to implement my own custom validation of server certificates.

FWIW, I'm not sure that this is going to be possible:
https://devforums.apple.com/thread/87346

Sixten
Reply all
Reply to author
Forward
0 new messages