I am developing a client server system with C++ and OpenSSL. It would
be very convenient if I could allow the server to accept SSL
connections from clients that present a certificate over SSL that is
not signed (in which case certificate chain verification would fail)
as well as clients with properly signed certificates. The code will
keep track of which clients are "secure" and "insecure" separately -
but I still need the SSL communication to work regardless.

How could I achieve this?