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 use kneverauthenticate?


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -