typo rename faild to failed (#1901)

This commit is contained in:
华仔
2024-04-10 13:51:03 +08:00
committed by GitHub
parent 22df64244a
commit 18a6dc5786
2 changed files with 5 additions and 5 deletions

View File

@@ -35,18 +35,18 @@ static void
_init_bio(lua_State* L, struct tls_context* tls_p, struct ssl_ctx* ctx_p) {
tls_p->ssl = SSL_new(ctx_p->ctx);
if(!tls_p->ssl) {
luaL_error(L, "SSL_new faild");
luaL_error(L, "SSL_new failed");
}
tls_p->in_bio = BIO_new(BIO_s_mem());
if(!tls_p->in_bio) {
luaL_error(L, "new in bio faild");
luaL_error(L, "new in bio failed");
}
BIO_set_mem_eof_return(tls_p->in_bio, -1); /* see: https://www.openssl.org/docs/crypto/BIO_s_mem.html */
tls_p->out_bio = BIO_new(BIO_s_mem());
if(!tls_p->out_bio) {
luaL_error(L, "new out bio faild");
luaL_error(L, "new out bio failed");
}
BIO_set_mem_eof_return(tls_p->out_bio, -1); /* see: https://www.openssl.org/docs/crypto/BIO_s_mem.html */
@@ -330,7 +330,7 @@ lnew_ctx(lua_State* L) {
unsigned int err = ERR_get_error();
char buf[256];
ERR_error_string_n(err, buf, sizeof(buf));
luaL_error(L, "SSL_CTX_new client faild. %s\n", buf);
luaL_error(L, "SSL_CTX_new client failed. %s\n", buf);
}
if(luaL_newmetatable(L, "_TLS_SSLCTX_METATABLE_")) {