diff options
Diffstat (limited to 'nginx/ngx_js.c')
-rw-r--r-- | nginx/ngx_js.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nginx/ngx_js.c b/nginx/ngx_js.c index ae7955ec..012adb48 100644 --- a/nginx/ngx_js.c +++ b/nginx/ngx_js.c @@ -10,6 +10,7 @@ #include <ngx_core.h> #include "ngx_js.h" #include "ngx_js_fetch.h" +#include "../external/njs_webcrypto.h" static njs_external_t ngx_js_ext_core[] = { @@ -176,6 +177,12 @@ ngx_js_core_init(njs_vm_t *vm, ngx_log_t *log) return NGX_ERROR; } + ret = njs_external_webcrypto_init(vm); + if (ret != NJS_OK) { + ngx_log_error(NGX_LOG_EMERG, log, 0, "failed to add webcrypto object"); + return NGX_ERROR; + } + proto_id = njs_vm_external_prototype(vm, ngx_js_ext_core, njs_nitems(ngx_js_ext_core)); if (proto_id < 0) { |