Correct a few minor bugs
The function name for bio_write was accidentally bio_read, probably copy/paste-o
from_ssl and into_ssl were not initialized to NULL, so later NULL checks might give the wrong results
Two test methods named test_connect were defined, so only the second ever ran
diff --git a/src/ssl/connection.c b/src/ssl/connection.c
index 4cdd53d..8708e80 100755
--- a/src/ssl/connection.c
+++ b/src/ssl/connection.c
@@ -260,7 +260,7 @@
return NULL;
}
- if (!PyArg_ParseTuple(args, "s#|i:bio_read", &buf, &len))
+ if (!PyArg_ParseTuple(args, "s#|i:bio_write", &buf, &len))
return NULL;
ret = BIO_write(self->into_ssl, buf, len);
@@ -1126,6 +1126,8 @@
self->socket = sock;
self->ssl = NULL;
+ self->from_ssl = NULL;
+ self->into_ssl = NULL;
Py_INCREF(Py_None);
self->app_data = Py_None;