How to use the node-opcua-pki.CertificateManager function in node-opcua-pki

To help you get started, we’ve selected a few node-opcua-pki examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-samples / bin / server_with_push_certificate.ts View on Github external
async function main() {

    const tmpFolder = path.join(__dirname, "../certificates/myApp");

    const applicationGroup = new CertificateManager({
        location: tmpFolder
    });
    await applicationGroup.initialize();

    const server = new OPCUAServer(server_options);

    console.log(" Configuration rootdir =  ", server.serverCertificateManager.rootDir);

    console.log(chalk.yellow("  server PID          :"), process.pid);

    server.on("post_initialize", () => {

        const addressSpace = server.engine.addressSpace!;
        // to do: expose new nodeid here
        const ns = addressSpace.getNamespaceIndex("http://yourorganisation.org/my_data_type/");

node-opcua-pki

PKI management for node-opcua

MIT
Latest version published 2 months ago

Package Health Score

68 / 100
Full package analysis

Popular node-opcua-pki functions