Socket
Socket
Sign inDemoInstall

@peculiar/x509

Package Overview
Dependencies
Maintainers
6
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peculiar/x509 - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

2

build/types/public_key.d.ts

@@ -9,3 +9,3 @@ import { SubjectPublicKeyInfo } from "@peculiar/asn1-x509";

export(crypto?: Crypto): Promise<CryptoKey>;
export(algorithm: Algorithm | EcKeyImportParams, keyUsages: KeyUsage[], crypto?: Crypto): Promise<CryptoKey>;
export(algorithm: Algorithm | EcKeyImportParams | RsaHashedImportParams, keyUsages: KeyUsage[], crypto?: Crypto): Promise<CryptoKey>;
protected onInit(asn: SubjectPublicKeyInfo): void;

@@ -12,0 +12,0 @@ getThumbprint(crypto?: Crypto): Promise<ArrayBuffer>;

@@ -400,10 +400,2 @@ /*!

class PemData extends AsnData {
constructor(...args) {
if (PemData.isAsnEncoded(args[0])) {
super(PemData.toArrayBuffer(args[0]), args[1]);
}
else {
super(args[0]);
}
}
static isAsnEncoded(data) {

@@ -434,2 +426,10 @@ return pvtsutils.BufferSourceConverter.isBufferSource(data) || typeof data === "string";

}
constructor(...args) {
if (PemData.isAsnEncoded(args[0])) {
super(PemData.toArrayBuffer(args[0]), args[1]);
}
else {
super(args[0]);
}
}
toString(format = "pem") {

@@ -621,12 +621,14 @@ switch (format) {

async getThumbprint(...args) {
var _a;
let crypto = cryptoProvider.get();
let crypto;
let algorithm = "SHA-1";
if (args.length >= 1 && !((_a = args[0]) === null || _a === void 0 ? void 0 : _a.subtle)) {
algorithm = args[0] || algorithm;
crypto = args[1] || crypto;
if (args[0]) {
if (!args[0].subtle) {
algorithm = args[0] || algorithm;
crypto = args[1];
}
else {
crypto = args[0];
}
}
else {
crypto = args[0] || crypto;
}
crypto !== null && crypto !== void 0 ? crypto : (crypto = cryptoProvider.get());
return await crypto.subtle.digest(algorithm, this.rawData);

@@ -718,2 +720,3 @@ }

exports.KeyUsageFlags = void 0;
(function (KeyUsageFlags) {

@@ -720,0 +723,0 @@ KeyUsageFlags[KeyUsageFlags["digitalSignature"] = 1] = "digitalSignature";

@@ -396,10 +396,2 @@ /*!

class PemData extends AsnData {
constructor(...args) {
if (PemData.isAsnEncoded(args[0])) {
super(PemData.toArrayBuffer(args[0]), args[1]);
}
else {
super(args[0]);
}
}
static isAsnEncoded(data) {

@@ -430,2 +422,10 @@ return BufferSourceConverter.isBufferSource(data) || typeof data === "string";

}
constructor(...args) {
if (PemData.isAsnEncoded(args[0])) {
super(PemData.toArrayBuffer(args[0]), args[1]);
}
else {
super(args[0]);
}
}
toString(format = "pem") {

@@ -617,12 +617,14 @@ switch (format) {

async getThumbprint(...args) {
var _a;
let crypto = cryptoProvider.get();
let crypto;
let algorithm = "SHA-1";
if (args.length >= 1 && !((_a = args[0]) === null || _a === void 0 ? void 0 : _a.subtle)) {
algorithm = args[0] || algorithm;
crypto = args[1] || crypto;
if (args[0]) {
if (!args[0].subtle) {
algorithm = args[0] || algorithm;
crypto = args[1];
}
else {
crypto = args[0];
}
}
else {
crypto = args[0] || crypto;
}
crypto !== null && crypto !== void 0 ? crypto : (crypto = cryptoProvider.get());
return await crypto.subtle.digest(algorithm, this.rawData);

@@ -629,0 +631,0 @@ }

{
"name": "@peculiar/x509",
"version": "1.2.1",
"version": "1.2.2",
"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,23 +86,23 @@ "main": "build/x509.cjs.js",

"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/core": "^7.13.10",
"@babel/preset-env": "^7.13.10",
"@peculiar/webcrypto": "^1.1.6",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@types/mocha": "^8.2.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.2.0",
"@types/mocha": "^8.2.1",
"@types/node": "^14.14.20",
"@typescript-eslint/eslint-plugin": "^4.13.0",
"@typescript-eslint/parser": "^4.13.0",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"coveralls": "^3.1.0",
"eslint": "^7.17.0",
"mocha": "^8.2.1",
"eslint": "^7.22.0",
"mocha": "^8.3.2",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"rollup": "^2.36.1",
"rollup": "^2.41.2",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.27.3",
"rollup-plugin-typescript2": "^0.30.0",
"ts-node": "^9.1.1",
"typedoc": "^0.19.2",
"typescript": "^4.1.3"
"typedoc": "^0.20.32",
"typescript": "^4.2.3"
},

@@ -117,3 +117,3 @@ "dependencies": {

"@peculiar/asn1-x509": "^2.0.27",
"pvtsutils": "^1.1.1",
"pvtsutils": "^1.1.2",
"reflect-metadata": "^0.1.13",

@@ -120,0 +120,0 @@ "tslib": "^2.1.0",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc