]> git.kaiwu.me - njs.git/commit
Introduced WebCrypto API according to W3C spec.
authorDmitry Volyntsev <xeioex@nginx.com>
Mon, 11 Oct 2021 15:06:15 +0000 (15:06 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Mon, 11 Oct 2021 15:06:15 +0000 (15:06 +0000)
commit7b2b7612dc4ee6370b93462602a9892f97d155b9
treec7066f5f81755376e2a688397274d73cf78d7ba6
parent648e89a6ac5106426edf8825790fa9c50d9caf3e
Introduced WebCrypto API according to W3C spec.

The following methods were implemented:
    crypto.getRandomValues()
    crypto.subtle.importKey()
        format: raw, pkcs8, spki
        algorithm: AES-CBC, AES-CTR, AES-GCM,
            ECDSA, HKDF, HMAC, PBKDF2,
            RSASSA-PKCS1-v1_5, RSA-OAEP, RSA-PSS
    crypto.subtle.decrypt()
    crypto.subtle.encrypt()
        algorithm: AES-CBC, AES-CTR, AES-GCM,
            RSA-OAEP
    crypto.subtle.deriveBits()
    crypto.subtle.deriveKey()
        algorithm: HKDF, PBKDF2
    crypto.subtle.digest()
        algorithm: SHA-1, SHA-256, SHA-384, SHA-512
    crypto.subtle.sign()
    crypto.subtle.verify()
        algorithm: ECDSA, HMAC, RSASSA-PKCS1-v1_5, RSA-PSS
58 files changed:
auto/make
auto/openssl [new file with mode: 0644]
auto/sources
auto/summary
configure
external/njs_webcrypto.c [new file with mode: 0644]
external/njs_webcrypto.h [new file with mode: 0644]
nginx/config
nginx/ngx_js.c
src/njs_shell.c
src/njs_str.c [new file with mode: 0644]
src/njs_str.h
src/test/njs_externals_test.c
src/test/njs_unit_test.c
test/njs_expect_test.exp
test/ts/test.ts
test/webcrypto/README.rst [new file with mode: 0644]
test/webcrypto/aes.js [new file with mode: 0644]
test/webcrypto/aes_decoding.js [new file with mode: 0644]
test/webcrypto/aes_gcm_enc.js [new file with mode: 0644]
test/webcrypto/derive.js [new file with mode: 0644]
test/webcrypto/digest.js [new file with mode: 0644]
test/webcrypto/ec.pkcs8 [new file with mode: 0644]
test/webcrypto/ec.spki [new file with mode: 0644]
test/webcrypto/ec2.pkcs8 [new file with mode: 0644]
test/webcrypto/ec2.spki [new file with mode: 0644]
test/webcrypto/rsa.js [new file with mode: 0644]
test/webcrypto/rsa.pkcs8 [new file with mode: 0644]
test/webcrypto/rsa.pkcs8.broken [new file with mode: 0644]
test/webcrypto/rsa.spki [new file with mode: 0644]
test/webcrypto/rsa.spki.broken [new file with mode: 0644]
test/webcrypto/rsa2.pkcs8 [new file with mode: 0644]
test/webcrypto/rsa2.spki [new file with mode: 0644]
test/webcrypto/rsa_decoding.js [new file with mode: 0644]
test/webcrypto/sign.js [new file with mode: 0644]
test/webcrypto/text.base64.aes-cbc128.enc [new file with mode: 0644]
test/webcrypto/text.base64.aes-cbc256.enc [new file with mode: 0644]
test/webcrypto/text.base64.aes-ctr128.enc [new file with mode: 0644]
test/webcrypto/text.base64.aes-ctr256.enc [new file with mode: 0644]
test/webcrypto/text.base64.aes-gcm128-96.enc [new file with mode: 0644]
test/webcrypto/text.base64.aes-gcm128-extra.enc [new file with mode: 0644]
test/webcrypto/text.base64.aes-gcm128.enc [new file with mode: 0644]
test/webcrypto/text.base64.aes-gcm256.enc [new file with mode: 0644]
test/webcrypto/text.base64.rsa-oaep.enc [new file with mode: 0644]
test/webcrypto/text.base64.sha1.ecdsa.sig [new file with mode: 0644]
test/webcrypto/text.base64.sha1.hmac.sig [new file with mode: 0644]
test/webcrypto/text.base64.sha1.pkcs1.sig [new file with mode: 0644]
test/webcrypto/text.base64.sha1.rsa-pss.16.sig [new file with mode: 0644]
test/webcrypto/text.base64.sha256.ecdsa.sig [new file with mode: 0644]
test/webcrypto/text.base64.sha256.hmac.sig [new file with mode: 0644]
test/webcrypto/text.base64.sha256.hmac.sig.broken [new file with mode: 0644]
test/webcrypto/text.base64.sha256.pkcs1.sig [new file with mode: 0644]
test/webcrypto/text.base64.sha256.rsa-pss.0.sig [new file with mode: 0644]
test/webcrypto/text.base64.sha256.rsa-pss.32.sig [new file with mode: 0644]
test/webcrypto/verify.js [new file with mode: 0644]
ts/index.d.ts
ts/njs_core.d.ts
ts/njs_webcrypto.d.ts [new file with mode: 0644]