Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
}
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
};
OPCUASecureObject.prototype.getCertificate = function () {
if (!this._certificate) {
const certChain = this.getCertificateChain();
this._certificate = split_der(certChain)[0];
}
return this._certificate;
};
public getCertificate(): Certificate {
if (!this.certificate) {
const certChain = this.getCertificateChain();
this.certificate = split_der(certChain)[0] as Certificate;
}
return this.certificate;
}
public getCertificate(): Certificate {
return split_der(this.getCertificateChain())[0];
}
function getCertificate(this: OPCUAServerPartial): Certificate {
if (!this.$$certificate) {
const certificateChain = getCertificateChain.call(this);
this.$$certificate = split_der(certificateChain)[0];
}
return this.$$certificate!;
}
public getCertificate(): Certificate {
return split_der(this.getCertificateChain())[0];
}