How to use the node-opcua-crypto.split_der function in node-opcua-crypto

To help you get started, we’ve selected a few node-opcua-crypto 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-secure-channel / source / server / server_secure_channel_layer.ts View on Github external
public getSignatureLength(): PublicKeyLength {
        const chain = this.getCertificateChain();
        const firstCertificateInChain = split_der(chain)[0];
        const cert = exploreCertificateInfo(firstCertificateInChain);
        return cert.publicKeyLength; // 1024 bits = 128Bytes or 2048=256Bytes
    }
github node-opcua / node-opcua / packages / node-opcua-secure-channel / src / server / server_secure_channel_layer.js View on Github external
ServerSecureChannelLayer.prototype.getSignatureLength = function() {
    const self = this;
    const chain = self.getCertificateChain();
    const s = split_der(chain)[0];
    const cert = crypto_utils.exploreCertificateInfo(s);
    return cert.publicKeyLength; // 1024 bits = 128Bytes or 2048=256Bytes
};
github node-opcua / node-opcua / packages / node-opcua-common / src / opcua_secure_object.js View on Github external
OPCUASecureObject.prototype.getCertificate = function () {

    if (!this._certificate) {
        const certChain    = this.getCertificateChain();
        this._certificate  = split_der(certChain)[0];
    }
    return this._certificate;
};
github node-opcua / node-opcua / packages / node-opcua-common / source / opcua_secure_object.ts View on Github external
public getCertificate(): Certificate {
        if (!this.certificate) {
            const certChain = this.getCertificateChain();
            this.certificate = split_der(certChain)[0] as Certificate;
        }
        return this.certificate;
    }
github node-opcua / node-opcua / packages / node-opcua-server / source / server_end_point.ts View on Github external
public getCertificate(): Certificate {
        return split_der(this.getCertificateChain())[0];
    }
github node-opcua / node-opcua / packages / node-opcua-server-configuration / source / server / install_push_certitifate_management.ts View on Github external
function getCertificate(this: OPCUAServerPartial): Certificate {
    if (!this.$$certificate) {
        const certificateChain = getCertificateChain.call(this);
        this.$$certificate = split_der(certificateChain)[0];
    }
    return this.$$certificate!;
}
github node-opcua / node-opcua / packages / node-opcua-server / source / server_end_point.ts View on Github external
public getCertificate(): Certificate {
        return split_der(this.getCertificateChain())[0];
    }