int r = tls_certificate_set(net, lua_tostring(L, 1), lua_tostring(L, 2));
if (r != 0) {
- lua_pushstring(L, strerror(ENOMEM));
+ lua_pushstring(L, kr_strerror(r));
lua_error(L);
}
int r = tls_client_params_set(&net->tls_client_params,
addr, port, NULL, NULL, NULL);
if (r != 0) {
- lua_pushstring(L, strerror(ENOMEM));
+ lua_pushstring(L, kr_strerror(r));
lua_error(L);
}
int r = tls_client_params_set(&net->tls_client_params,
addr, port, NULL, NULL, pin);
if (r != 0) {
- lua_pushstring(L, strerror(ENOMEM));
+ lua_pushstring(L, kr_strerror(r));
lua_error(L);
}
lua_pop(L, 1);
int r = tls_client_params_set(&net->tls_client_params,
addr, port, ca_file, NULL, NULL);
if (r != 0) {
- lua_pushstring(L, strerror(ENOMEM));
+ lua_pushstring(L, kr_strerror(r));
lua_error(L);
}
/* removes 'value'; keeps 'key' for next iteration */
int r = tls_client_params_set(&net->tls_client_params,
addr, port, NULL, hostname, NULL);
if (r != 0) {
- lua_pushstring(L, strerror(ENOMEM));
+ lua_pushstring(L, kr_strerror(r));
lua_error(L);
}
/* removes 'value'; keeps 'key' for next iteration */
/* Create query packet */
knot_pkt_t *pkt = knot_pkt_new(NULL, KNOT_EDNS_MAX_UDP_PAYLOAD, NULL);
if (!pkt) {
- lua_pushstring(L, strerror(ENOMEM));
+ lua_pushstring(L, kr_strerror(ENOMEM));
lua_error(L);
}
uint8_t dname[KNOT_DNAME_MAXLEN];
int res = gnutls_certificate_set_x509_trust_file(entry->credentials, value,
GNUTLS_X509_FMT_PEM);
if (res < 0) {
- kr_log_error("[tls client], failed to import certificate file '%s' (%s)\n",
+ kr_log_error("[tls client] failed to import certificate file '%s' (%s)\n",
value, gnutls_strerror_name(res));
/* value will be freed at cleanup */
ret = kr_error(EINVAL);