xml-crypto
Advanced tools
Comparing version
@@ -157,5 +157,5 @@ "use strict"; | ||
if (keyInfo != null) { | ||
const certs = xpath.select1(".//*[local-name(.)='X509Certificate']", keyInfo); | ||
if (isDomNode.isNodeLike(certs)) { | ||
return utils.derToPem(certs.textContent || "", "CERTIFICATE"); | ||
const cert = xpath.select1(".//*[local-name(.)='X509Certificate']", keyInfo); | ||
if (isDomNode.isNodeLike(cert)) { | ||
return utils.derToPem(cert.textContent ?? "", "CERTIFICATE"); | ||
} | ||
@@ -162,0 +162,0 @@ } |
@@ -149,7 +149,7 @@ "use strict"; | ||
} | ||
if (exports.BASE64_REGEX.test(base64Der)) { | ||
if (exports.BASE64_REGEX.test(base64Der.replace(/ /g, ""))) { | ||
if (pemLabel == null) { | ||
throw new Error("PEM label is required when DER is given."); | ||
} | ||
const pem = `-----BEGIN ${pemLabel}-----\n${base64Der}\n-----END ${pemLabel}-----`; | ||
const pem = `-----BEGIN ${pemLabel}-----\n${base64Der.replace(/ /g, "")}\n-----END ${pemLabel}-----`; | ||
return normalizePem(pem); | ||
@@ -156,0 +156,0 @@ } |
{ | ||
"name": "xml-crypto", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"private": false, | ||
@@ -51,9 +51,9 @@ "description": "Xml digital signature and encryption library for Node.js", | ||
"@types/mocha": "^10.0.6", | ||
"@types/node": "^16.18.58", | ||
"@typescript-eslint/eslint-plugin": "^6.13.0", | ||
"@typescript-eslint/parser": "^6.13.0", | ||
"@types/node": "^16.18.69", | ||
"@typescript-eslint/eslint-plugin": "^6.18.1", | ||
"@typescript-eslint/parser": "^6.18.1", | ||
"chai": "^4.3.10", | ||
"choma": "^1.2.1", | ||
"ejs": "^3.1.9", | ||
"eslint": "^8.54.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
@@ -66,3 +66,3 @@ "eslint-plugin-deprecation": "^2.0.0", | ||
"prettier-plugin-packagejson": "^2.4.6", | ||
"release-it": "^16.2.1", | ||
"release-it": "^16.3.0", | ||
"source-map-support": "^0.5.21", | ||
@@ -69,0 +69,0 @@ "ts-node": "^10.9.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
266001
0.06%