Hi, I would like my SSL client to be able to detect when the server it's connecting to requested a client cert. If the client doesn't provide a cert, the SSL handshake fails with "SSL alert number 40". However, AFAIK this error could be triggered by other problems with the handshake, so I can't use this alert to deduce that the handshake failed because my client didn't provide a cert.
One way to detect this is to call SSL_get_client_CA_list() but there are servers that require a client cert and don't even return a CA list, so this is not reliable. How can my client detect that a handshake failed because the server requires a client certificate and it didn't supply one ? Thanks!