Fix compiler warnings in openssl.c

There were few warnings about char and int signedness + one unused var.