fix bug in x509:digest
a few broken compat with luasec,please see https://github.com/zhaozg/lua-openssl/tree/master/test/luasec/README