luvit/luvit — pull request #215 by philips (2012-04-26 22:43:38+00:00)
Title: tls: hookup passing back the error string to lua

Before Ryan's cert fix I was debugging what was happening. In the
process I hooked up getting the error string back out to lua and
emitting an error event.

e.g. test-tls-connect-simple-twice returned:

unhandled error!
"140646688597824:error:0D07209B:asn1 encoding routines:ASN1_get_object:too long:../deps/openssl/openssl/crypto/asn1/asn1_lib.c:142:\n140646688597824:error:0D068066:asn1 encoding routines:ASN1_CHECK_TLEN:bad object header:../deps/openssl/openssl/crypto/asn1/tasn_dec.c:1306:\n140646688597824:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:../deps/openssl/openssl/crypto/asn1/tasn_dec.c:381:Type=X509\n140646688597824:error:0906700D:PEM routines:PEM_ASN1_read_bio:ASN1 lib:../deps/openssl/openssl/crypto/pem/pem_oth.c:83:\n"
FAIL assert - assertion failed - Line: 37