diff --git a/packages/node-opcua-crypto-test/test/test_create_certificate_signing_request.ts b/packages/node-opcua-crypto-test/test/test_create_certificate_signing_request.ts index 606f756..ea60049 100644 --- a/packages/node-opcua-crypto-test/test/test_create_certificate_signing_request.ts +++ b/packages/node-opcua-crypto-test/test/test_create_certificate_signing_request.ts @@ -21,9 +21,9 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import fs from "fs"; -import path from "path"; -import os from "os"; +import fs from "node:fs"; +import path from "node:path"; +import os from "node:os"; import "should"; diff --git a/packages/node-opcua-crypto-test/test/test_create_key_pair.ts b/packages/node-opcua-crypto-test/test/test_create_key_pair.ts index 2ebd00b..c1b88bc 100644 --- a/packages/node-opcua-crypto-test/test/test_create_key_pair.ts +++ b/packages/node-opcua-crypto-test/test/test_create_key_pair.ts @@ -21,9 +21,9 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import fs from "fs"; -import path from "path"; -import os from "os"; +import fs from "node:fs"; +import path from "node:path"; +import os from "node:os"; import should from "should"; import { diff --git a/packages/node-opcua-crypto-test/test/test_create_self_signed_certificate.ts b/packages/node-opcua-crypto-test/test/test_create_self_signed_certificate.ts index 8ae894c..1d2736a 100644 --- a/packages/node-opcua-crypto-test/test/test_create_self_signed_certificate.ts +++ b/packages/node-opcua-crypto-test/test/test_create_self_signed_certificate.ts @@ -21,10 +21,10 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import fs from "fs"; -import path from "path"; -import os from "os"; -import util from "util"; +import fs from "node:fs"; +import path from "node:path"; +import os from "node:os"; +import util from "node:util"; import should from "should"; import x509 from "@peculiar/x509"; import { diff --git a/packages/node-opcua-crypto-test/test/test_crypto.ts b/packages/node-opcua-crypto-test/test/test_crypto.ts index 135b5f8..6565f76 100644 --- a/packages/node-opcua-crypto-test/test/test_crypto.ts +++ b/packages/node-opcua-crypto-test/test/test_crypto.ts @@ -22,6 +22,8 @@ // --------------------------------------------------------------------------------------------------------------------- import assert from "assert"; +import fs from "node:fs"; +import path from "node:path"; import { createHmac, createCipheriv, @@ -32,9 +34,7 @@ import { publicEncrypt as publicEncrypt_fromCrypto, randomBytes, KeyObject, -} from "crypto"; -import fs from "fs"; -import path from "path"; +} from "node:crypto"; import should from "should"; import * as loremIpsum1 from "lorem-ipsum"; diff --git a/packages/node-opcua-crypto-test/test/test_crypto_explore_certificate.ts b/packages/node-opcua-crypto-test/test/test_crypto_explore_certificate.ts index c0d2f34..879c6e1 100644 --- a/packages/node-opcua-crypto-test/test/test_crypto_explore_certificate.ts +++ b/packages/node-opcua-crypto-test/test/test_crypto_explore_certificate.ts @@ -22,8 +22,8 @@ // --------------------------------------------------------------------------------------------------------------------- import should from "should"; -import path from "path"; -import fs from "fs"; +import path from "node:path"; +import fs from "node:fs"; import { readCertificate, diff --git a/packages/node-opcua-crypto-test/test/test_crypto_utils.ts b/packages/node-opcua-crypto-test/test/test_crypto_utils.ts index b545807..731d5e9 100644 --- a/packages/node-opcua-crypto-test/test/test_crypto_utils.ts +++ b/packages/node-opcua-crypto-test/test/test_crypto_utils.ts @@ -21,9 +21,9 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import fs from "fs"; -import os from "os"; -import path from "path"; +import fs from "node:fs"; +import os from "node:os"; +import path from "node:path"; import * as loremIpsum from "lorem-ipsum"; import "should"; diff --git a/packages/node-opcua-crypto-test/test/test_explore_crl.ts b/packages/node-opcua-crypto-test/test/test_explore_crl.ts index aa89d5f..f93df26 100644 --- a/packages/node-opcua-crypto-test/test/test_explore_crl.ts +++ b/packages/node-opcua-crypto-test/test/test_explore_crl.ts @@ -21,7 +21,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import path from "path"; +import path from "node:path"; import { verifyCertificateRevocationListSignature, exploreCertificateRevocationList, diff --git a/packages/node-opcua-crypto-test/test/test_explore_csr.ts b/packages/node-opcua-crypto-test/test/test_explore_csr.ts index 882ed46..3b39d75 100644 --- a/packages/node-opcua-crypto-test/test/test_explore_csr.ts +++ b/packages/node-opcua-crypto-test/test/test_explore_csr.ts @@ -21,7 +21,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import path from "path"; +import path from "node:path"; import { exploreCertificateSigningRequest } from "node-opcua-crypto"; import { readCertificateSigningRequest } from "node-opcua-crypto"; diff --git a/packages/node-opcua-crypto-test/test/test_explore_private_key.ts b/packages/node-opcua-crypto-test/test/test_explore_private_key.ts index b6fbf40..db63cc8 100644 --- a/packages/node-opcua-crypto-test/test/test_explore_private_key.ts +++ b/packages/node-opcua-crypto-test/test/test_explore_private_key.ts @@ -21,7 +21,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import path from "path"; +import path from "node:path"; import { explorePrivateKey } from "node-opcua-crypto"; import { readPrivateRsaKey, readPrivateKey } from "node-opcua-crypto"; import "should"; diff --git a/packages/node-opcua-crypto-test/test/test_extKeyUsage.ts b/packages/node-opcua-crypto-test/test/test_extKeyUsage.ts index 03b89e2..17cf8b2 100644 --- a/packages/node-opcua-crypto-test/test/test_extKeyUsage.ts +++ b/packages/node-opcua-crypto-test/test/test_extKeyUsage.ts @@ -21,9 +21,9 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import path from "path"; -import { exploreCertificate, readCertificate } from "node-opcua-crypto"; +import path from "node:path"; import should from "should"; +import { exploreCertificate, readCertificate } from "node-opcua-crypto"; describe("X509ExtKeyUsage", () => { it("should parse extKeyUsage 1", () => { diff --git a/packages/node-opcua-crypto-test/test/test_makeThumprint.ts b/packages/node-opcua-crypto-test/test/test_makeThumprint.ts index 08470ec..9529ec0 100644 --- a/packages/node-opcua-crypto-test/test/test_makeThumprint.ts +++ b/packages/node-opcua-crypto-test/test/test_makeThumprint.ts @@ -21,7 +21,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import path from "path"; +import path from "node:path"; import { makeSHA1Thumbprint } from "node-opcua-crypto"; import { readCertificate } from "node-opcua-crypto"; diff --git a/packages/node-opcua-crypto-test/test/test_make_private_key_from_pem.ts b/packages/node-opcua-crypto-test/test/test_make_private_key_from_pem.ts index 9eea17c..152ea68 100644 --- a/packages/node-opcua-crypto-test/test/test_make_private_key_from_pem.ts +++ b/packages/node-opcua-crypto-test/test/test_make_private_key_from_pem.ts @@ -1,4 +1,4 @@ -import path from "path"; +import path from "node:path"; import "should"; import { makePrivateKeyFromPem, diff --git a/packages/node-opcua-crypto-test/test/test_peculiar_edge_case.ts b/packages/node-opcua-crypto-test/test/test_peculiar_edge_case.ts index aea41fc..746acc0 100644 --- a/packages/node-opcua-crypto-test/test/test_peculiar_edge_case.ts +++ b/packages/node-opcua-crypto-test/test/test_peculiar_edge_case.ts @@ -1,6 +1,6 @@ -import path from "path"; -import fs from "fs"; -import { tmpdir } from "os"; +import path from "node:path"; +import fs from "node:fs"; +import { tmpdir } from "node:os"; import { Crypto as PeculiarWebCrypto } from "@peculiar/webcrypto"; import * as x509 from "@peculiar/x509"; import { AsnConvert, AsnUtf8StringConverter } from "@peculiar/asn1-schema"; @@ -116,7 +116,7 @@ declare const window: any; const ignoreCrypto = process.env.IGNORE_SUBTLE_FROM_CRYPTO; -import nativeCrypto from "crypto"; +import nativeCrypto from "node:crypto"; if (typeof window === "undefined") { _crypto = nativeCrypto as any; diff --git a/packages/node-opcua-crypto-test/test/test_private_public_key_match.ts b/packages/node-opcua-crypto-test/test/test_private_public_key_match.ts index 4250da1..04654b0 100644 --- a/packages/node-opcua-crypto-test/test/test_private_public_key_match.ts +++ b/packages/node-opcua-crypto-test/test/test_private_public_key_match.ts @@ -21,7 +21,7 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import path from "path"; +import path from "node:path"; import { exploreCertificate, explorePrivateKey } from "node-opcua-crypto"; import { publicKeyAndPrivateKeyMatches, certificateMatchesPrivateKey } from "node-opcua-crypto"; import { readCertificate, readPrivateKey } from "node-opcua-crypto"; diff --git a/packages/node-opcua-crypto-test/test/test_rsaLengthPublicKey.ts b/packages/node-opcua-crypto-test/test/test_rsaLengthPublicKey.ts index 9eae28f..9f1dc4b 100644 --- a/packages/node-opcua-crypto-test/test/test_rsaLengthPublicKey.ts +++ b/packages/node-opcua-crypto-test/test/test_rsaLengthPublicKey.ts @@ -21,8 +21,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import { createPublicKey } from "crypto"; -import path from "path"; +import { createPublicKey } from "node:crypto"; +import path from "node:path"; import { rsaLengthPublicKey } from "node-opcua-crypto"; import { readCertificate, readCertificatePEM } from "node-opcua-crypto"; diff --git a/packages/node-opcua-crypto-test/test/test_verifyCertificateChain.ts b/packages/node-opcua-crypto-test/test/test_verifyCertificateChain.ts index 2f008b7..49b8713 100644 --- a/packages/node-opcua-crypto-test/test/test_verifyCertificateChain.ts +++ b/packages/node-opcua-crypto-test/test/test_verifyCertificateChain.ts @@ -21,9 +21,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import path from "path"; -import { verifyCertificateChain } from "node-opcua-crypto"; -import { readCertificate } from "node-opcua-crypto"; +import path from "node:path"; +import { verifyCertificateChain, readCertificate } from "node-opcua-crypto"; describe("Test Certificate Chain", () => { it("DX should verify a certificate chain", async () => { diff --git a/packages/node-opcua-crypto-test/test/test_verify_certificate_signature.ts b/packages/node-opcua-crypto-test/test/test_verify_certificate_signature.ts index 0396afc..4f9ab34 100644 --- a/packages/node-opcua-crypto-test/test/test_verify_certificate_signature.ts +++ b/packages/node-opcua-crypto-test/test/test_verify_certificate_signature.ts @@ -21,8 +21,8 @@ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // --------------------------------------------------------------------------------------------------------------------- -import path from "path"; -import { SignPrivateKeyInput, constants, createSign } from "crypto"; +import path from "node:path"; +import { SignPrivateKeyInput, constants, createSign } from "node:crypto"; import { verifyCertificateSignature, Certificate, toPem2, PrivateKey } from "node-opcua-crypto"; import { asn1 } from "node-opcua-crypto"; import { readCertificate, readPrivateKey } from "node-opcua-crypto";