@peculiar/x509
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -13,3 +13,3 @@ import { AsnEncodedType, AsnExportType } from "./pem_data"; | ||
clear(): void; | ||
toString(format?: AsnEncodedType): string; | ||
toString(format?: AsnExportType): string; | ||
} |
@@ -1152,4 +1152,4 @@ /*! | ||
} | ||
removePadding(data) { | ||
const bytes = BufferSourceConverter.toUint8Array(data); | ||
removePadding(data, positive = false) { | ||
let bytes = BufferSourceConverter.toUint8Array(data); | ||
for (let i = 0; i < bytes.length; i++) { | ||
@@ -1159,5 +1159,11 @@ if (!bytes[i]) { | ||
} | ||
return bytes.slice(i).buffer; | ||
bytes = bytes.slice(i); | ||
break; | ||
} | ||
return new ArrayBuffer(0); | ||
if (positive && bytes[0] > 127) { | ||
const result = new Uint8Array(bytes.length + 1); | ||
result.set(bytes, 1); | ||
return result.buffer; | ||
} | ||
return bytes.buffer; | ||
} | ||
@@ -1170,4 +1176,4 @@ toAsnSignature(algorithm, signature) { | ||
const uint8Signature = BufferSourceConverter.toUint8Array(signature); | ||
ecSignature.r = this.removePadding(uint8Signature.slice(0, pointSize)); | ||
ecSignature.s = this.removePadding(uint8Signature.slice(pointSize, pointSize + pointSize)); | ||
ecSignature.r = this.removePadding(uint8Signature.slice(0, pointSize), true); | ||
ecSignature.s = this.removePadding(uint8Signature.slice(pointSize, pointSize + pointSize), true); | ||
return AsnConvert.serialize(ecSignature); | ||
@@ -1174,0 +1180,0 @@ } |
{ | ||
"name": "@peculiar/x509", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "@peculiar/x509 is an easy to use TypeScript/Javascript library based on @peculiar/asn1-schema that makes generating X.509 Certificates and Certificate Requests as well as validating certificate chains easy", | ||
@@ -86,21 +86,21 @@ "main": "build/x509.cjs.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.13.16", | ||
"@babel/preset-env": "^7.13.15", | ||
"@peculiar/webcrypto": "^1.1.6", | ||
"@babel/core": "^7.14.3", | ||
"@babel/preset-env": "^7.14.2", | ||
"@peculiar/webcrypto": "^1.1.7", | ||
"@rollup/plugin-babel": "^5.3.0", | ||
"@rollup/plugin-commonjs": "^18.0.0", | ||
"@rollup/plugin-node-resolve": "^11.2.1", | ||
"@rollup/plugin-commonjs": "^19.0.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"@types/mocha": "^8.2.2", | ||
"@types/node": "^14.14.20", | ||
"@typescript-eslint/eslint-plugin": "^4.22.0", | ||
"@typescript-eslint/parser": "^4.22.0", | ||
"@types/node": "^14.17.1", | ||
"@typescript-eslint/eslint-plugin": "^4.25.0", | ||
"@typescript-eslint/parser": "^4.25.0", | ||
"coveralls": "^3.1.0", | ||
"eslint": "^7.25.0", | ||
"mocha": "^8.3.2", | ||
"eslint": "^7.27.0", | ||
"mocha": "^8.4.0", | ||
"nyc": "^15.1.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.46.0", | ||
"rollup": "^2.50.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.30.0", | ||
"ts-node": "^9.1.1", | ||
"ts-node": "^10.0.0", | ||
"typedoc": "^0.20.36", | ||
@@ -110,10 +110,10 @@ "typescript": "^4.2.4" | ||
"dependencies": { | ||
"@peculiar/asn1-cms": "^2.0.32", | ||
"@peculiar/asn1-cms": "^2.0.33", | ||
"@peculiar/asn1-csr": "^2.0.32", | ||
"@peculiar/asn1-ecc": "^2.0.32", | ||
"@peculiar/asn1-pkcs9": "^2.0.32", | ||
"@peculiar/asn1-rsa": "^2.0.32", | ||
"@peculiar/asn1-pkcs9": "^2.0.34", | ||
"@peculiar/asn1-rsa": "^2.0.34", | ||
"@peculiar/asn1-schema": "^2.0.32", | ||
"@peculiar/asn1-x509": "^2.0.32", | ||
"pvtsutils": "^1.1.5", | ||
"pvtsutils": "^1.1.7", | ||
"reflect-metadata": "^0.1.13", | ||
@@ -120,0 +120,0 @@ "tslib": "^2.2.0", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
327299
4240
1
Updated@peculiar/asn1-cms@^2.0.33
Updated@peculiar/asn1-pkcs9@^2.0.34
Updated@peculiar/asn1-rsa@^2.0.34
Updatedpvtsutils@^1.1.7