c - Configure weak host validation on server-side TLS connection with Apple Secure Transport -
i want write server (purely testing!!) allows client connect cert includes invalid hostname. i'm using apple's secure transport api in c on mac os x. set server connection like:
sslcontextref ssl_ctx_ref = sslcreatecontext (kcfallocatordefault, ksslserverside, ksslstreamtype); sslsetclientsideauthenticate (ssl_ctx_ref, ktryauthenticate);
with in place, if client presents certificate invalid hostname, sslhandshake
fails errsslclosedabort (-9806).
passing kneverauthenticate
instead of ktryauthenticate
allows invalid client cert.
questions:
- is
sslsetclientsideauthenticate
right function using purpose -- enabling weak hostname validation client certificates? - if so, why doesn't
ktryauthenticate
so, why must usekneverauthenticate
?
Comments
Post a Comment