Arbitrarily decide to cast the unsigned char buffer to a signed char buffer when passing in to Python (instead of making it signed and casting it to unsigned when passing it into OpenSSL).
Actually it's not entirely arbitrary. It makes more sense to represent arbitrary binary data as unsigned char.
diff --git a/src/crypto/crypto.c b/src/crypto/crypto.c
index a461ef9..d9f1a4e 100644
--- a/src/crypto/crypto.c
+++ b/src/crypto/crypto.c
@@ -632,7 +632,7 @@
return NULL;
}
- buffer = PyString_FromStringAndSize(sig_buf, sig_len);
+ buffer = PyString_FromStringAndSize((char*)sig_buf, sig_len);
return buffer;
}