SSL Error codes

Does anyone have a list of wip_event_t errors that can be thrown by the SSL plugin? I can’t seem to find any reference to errors in the documentation.

There is a list of errors in the WIPLib user guide that covers errors that are returned from non-ssl sockets, defined in wip_channel.h, there is no corresponding list of errors in the SSL user guide.

For example if I try to create an SSL socket with a certificate that is not yet valid a -1999 error is returned. I can not find a reference to this error anywhere.

R

Just to add to my previous post.

There is also a set of SSL errors that get printed in the trace output that I can’t seem to figure out how to get access to in code.

For example when a certificate is expired you see something like the text pasted below. How do you get access to the Failure reason so it can be bubbled up and reported in the rest of the system. There has to be some means to get last error, in this case X509_V_ERR_CERT_HAS_EXPIRED.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@ WARNING! SSL VERIFICATION FAILURE @@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Failure reason: X509_V_ERR_CERT_HAS_EXPIRED
[SSL] SSL_ERROR_SSL
[SSL] Serious connection error 1 (SSL state==0)
CardEase_Authorise_Handler() ==> WIP_CEV_ERROR 1