Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphene-pk11

Package Overview
Dependencies
Maintainers
2
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphene-pk11 - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

build/cjs/error.js

2

build/cjs/core/object.js

@@ -12,3 +12,3 @@ "use strict";

tslib_1.__decorate([
enumerable_1.enumerable(false)
(0, enumerable_1.enumerable)(false)
], BaseObject.prototype, "lib", void 0);

@@ -15,0 +15,0 @@ exports.BaseObject = BaseObject;

@@ -106,3 +106,3 @@ "use strict";

const type = this.innerItems[index];
const handle = core_1.uint64ToBuffer(type, true);
const handle = (0, core_1.uint64ToBuffer)(type, true);
return new Mechanism(type, handle, this.slotHandle, this.lib);

@@ -109,0 +109,0 @@ }

@@ -7,2 +7,3 @@ "use strict";

const core = tslib_1.__importStar(require("./core"));
const error_1 = require("./error");
const slot_1 = require("./slot");

@@ -28,4 +29,5 @@ class Module extends core.BaseObject {

catch (e) {
if (!/CKR_CRYPTOKI_ALREADY_INITIALIZED/.test(e.message)) {
throw e;
const error = (0, error_1.prepareError)(e);
if (!/CKR_CRYPTOKI_ALREADY_INITIALIZED/.test(error.message)) {
throw error;
}

@@ -32,0 +34,0 @@ }

@@ -104,3 +104,3 @@ "use strict";

tslib_1.__decorate([
attribute_1.attribute("class")
(0, attribute_1.attribute)("class")
], SessionObject.prototype, "class", void 0);

@@ -107,0 +107,0 @@ exports.SessionObject = SessionObject;

@@ -10,16 +10,16 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("owner")
(0, core_1.attribute)("owner")
], AttributeCertificate.prototype, "owner", void 0);
tslib_1.__decorate([
core_1.attribute("issuerAC")
(0, core_1.attribute)("issuerAC")
], AttributeCertificate.prototype, "issuer", void 0);
tslib_1.__decorate([
core_1.attribute("serial")
(0, core_1.attribute)("serial")
], AttributeCertificate.prototype, "serialNumber", void 0);
tslib_1.__decorate([
core_1.attribute("attrTypes")
(0, core_1.attribute)("attrTypes")
], AttributeCertificate.prototype, "types", void 0);
tslib_1.__decorate([
core_1.attribute("value")
(0, core_1.attribute)("value")
], AttributeCertificate.prototype, "value", void 0);
exports.AttributeCertificate = AttributeCertificate;

@@ -24,19 +24,19 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("certType")
(0, core_1.attribute)("certType")
], Certificate.prototype, "type", void 0);
tslib_1.__decorate([
core_1.attribute("trusted")
(0, core_1.attribute)("trusted")
], Certificate.prototype, "trusted", void 0);
tslib_1.__decorate([
core_1.attribute("certCategory")
(0, core_1.attribute)("certCategory")
], Certificate.prototype, "category", void 0);
tslib_1.__decorate([
core_1.attribute("checkValue")
(0, core_1.attribute)("checkValue")
], Certificate.prototype, "checkValue", void 0);
tslib_1.__decorate([
core_1.attribute("startDate")
(0, core_1.attribute)("startDate")
], Certificate.prototype, "startDate", void 0);
tslib_1.__decorate([
core_1.attribute("endDate")
(0, core_1.attribute)("endDate")
], Certificate.prototype, "endDate", void 0);
exports.Certificate = Certificate;

@@ -10,25 +10,25 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("subject")
(0, core_1.attribute)("subject")
], WtlsCertificate.prototype, "subject", void 0);
tslib_1.__decorate([
core_1.attribute("issuer")
(0, core_1.attribute)("issuer")
], WtlsCertificate.prototype, "issuer", void 0);
tslib_1.__decorate([
core_1.attribute("id")
(0, core_1.attribute)("id")
], WtlsCertificate.prototype, "id", void 0);
tslib_1.__decorate([
core_1.attribute("value")
(0, core_1.attribute)("value")
], WtlsCertificate.prototype, "value", void 0);
tslib_1.__decorate([
core_1.attribute("url")
(0, core_1.attribute)("url")
], WtlsCertificate.prototype, "url", void 0);
tslib_1.__decorate([
core_1.attribute("serial")
(0, core_1.attribute)("serial")
], WtlsCertificate.prototype, "serialNumber", void 0);
tslib_1.__decorate([
core_1.attribute("spi")
(0, core_1.attribute)("spi")
], WtlsCertificate.prototype, "subjectKeyIdentifier", void 0);
tslib_1.__decorate([
core_1.attribute("aki")
(0, core_1.attribute)("aki")
], WtlsCertificate.prototype, "authorityKeyIdentifier", void 0);
exports.WtlsCertificate = WtlsCertificate;

@@ -23,25 +23,25 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("subject")
(0, core_1.attribute)("subject")
], X509Certificate.prototype, "subject", void 0);
tslib_1.__decorate([
core_1.attribute("id")
(0, core_1.attribute)("id")
], X509Certificate.prototype, "id", void 0);
tslib_1.__decorate([
core_1.attribute("issuer")
(0, core_1.attribute)("issuer")
], X509Certificate.prototype, "issuer", void 0);
tslib_1.__decorate([
core_1.attribute("value")
(0, core_1.attribute)("value")
], X509Certificate.prototype, "value", void 0);
tslib_1.__decorate([
core_1.attribute("url")
(0, core_1.attribute)("url")
], X509Certificate.prototype, "url", void 0);
tslib_1.__decorate([
core_1.attribute("ski")
(0, core_1.attribute)("ski")
], X509Certificate.prototype, "subjectKeyIdentifier", void 0);
tslib_1.__decorate([
core_1.attribute("aki")
(0, core_1.attribute)("aki")
], X509Certificate.prototype, "authorityKeyIdentifier", void 0);
tslib_1.__decorate([
core_1.attribute("javaDomain")
(0, core_1.attribute)("javaDomain")
], X509Certificate.prototype, "java", void 0);
exports.X509Certificate = X509Certificate;

@@ -10,10 +10,10 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("application")
(0, core_1.attribute)("application")
], Data.prototype, "application", void 0);
tslib_1.__decorate([
core_1.attribute("objectId")
(0, core_1.attribute)("objectId")
], Data.prototype, "objectId", void 0);
tslib_1.__decorate([
core_1.attribute("value")
(0, core_1.attribute)("value")
], Data.prototype, "value", void 0);
exports.Data = Data;

@@ -10,7 +10,7 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("keyType")
(0, core_1.attribute)("keyType")
], DomainParameters.prototype, "keyType", void 0);
tslib_1.__decorate([
core_1.attribute("local")
(0, core_1.attribute)("local")
], DomainParameters.prototype, "local", void 0);
exports.DomainParameters = DomainParameters;

@@ -88,22 +88,22 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("keyType")
(0, core_1.attribute)("keyType")
], Key.prototype, "type", void 0);
tslib_1.__decorate([
core_1.attribute("id")
(0, core_1.attribute)("id")
], Key.prototype, "id", void 0);
tslib_1.__decorate([
core_1.attribute("startDate")
(0, core_1.attribute)("startDate")
], Key.prototype, "startDate", void 0);
tslib_1.__decorate([
core_1.attribute("endDate")
(0, core_1.attribute)("endDate")
], Key.prototype, "endDate", void 0);
tslib_1.__decorate([
core_1.attribute("derive", false)
(0, core_1.attribute)("derive", false)
], Key.prototype, "derive", void 0);
tslib_1.__decorate([
core_1.attribute("local")
(0, core_1.attribute)("local")
], Key.prototype, "local", void 0);
tslib_1.__decorate([
core_1.attribute("keyGenMechanism")
(0, core_1.attribute)("keyGenMechanism")
], Key.prototype, "mechanism", void 0);
exports.Key = Key;

@@ -16,34 +16,34 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("subject")
(0, core_1.attribute)("subject")
], PrivateKey.prototype, "subject", void 0);
tslib_1.__decorate([
core_1.attribute("sensitive")
(0, core_1.attribute)("sensitive")
], PrivateKey.prototype, "sensitive", void 0);
tslib_1.__decorate([
core_1.attribute("decrypt", false)
(0, core_1.attribute)("decrypt", false)
], PrivateKey.prototype, "decrypt", void 0);
tslib_1.__decorate([
core_1.attribute("sign", false)
(0, core_1.attribute)("sign", false)
], PrivateKey.prototype, "sign", void 0);
tslib_1.__decorate([
core_1.attribute("signRecover", false)
(0, core_1.attribute)("signRecover", false)
], PrivateKey.prototype, "signRecover", void 0);
tslib_1.__decorate([
core_1.attribute("unwrap", false)
(0, core_1.attribute)("unwrap", false)
], PrivateKey.prototype, "unwrap", void 0);
tslib_1.__decorate([
core_1.attribute("extractable", false)
(0, core_1.attribute)("extractable", false)
], PrivateKey.prototype, "extractable", void 0);
tslib_1.__decorate([
core_1.attribute("alwaysSensitive", false)
(0, core_1.attribute)("alwaysSensitive", false)
], PrivateKey.prototype, "alwaysSensitive", void 0);
tslib_1.__decorate([
core_1.attribute("neverExtractable", false)
(0, core_1.attribute)("neverExtractable", false)
], PrivateKey.prototype, "neverExtractable", void 0);
tslib_1.__decorate([
core_1.attribute("wrapTrusted", false)
(0, core_1.attribute)("wrapTrusted", false)
], PrivateKey.prototype, "wrapTrusted", void 0);
tslib_1.__decorate([
core_1.attribute("alwaysAuthenticate", false)
(0, core_1.attribute)("alwaysAuthenticate", false)
], PrivateKey.prototype, "alwaysAuthenticate", void 0);
exports.PrivateKey = PrivateKey;

@@ -16,19 +16,19 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("subject")
(0, core_1.attribute)("subject")
], PublicKey.prototype, "subject", void 0);
tslib_1.__decorate([
core_1.attribute("encrypt", false)
(0, core_1.attribute)("encrypt", false)
], PublicKey.prototype, "encrypt", void 0);
tslib_1.__decorate([
core_1.attribute("verify", false)
(0, core_1.attribute)("verify", false)
], PublicKey.prototype, "verify", void 0);
tslib_1.__decorate([
core_1.attribute("verifyRecover", false)
(0, core_1.attribute)("verifyRecover", false)
], PublicKey.prototype, "verifyRecover", void 0);
tslib_1.__decorate([
core_1.attribute("wrap", false)
(0, core_1.attribute)("wrap", false)
], PublicKey.prototype, "wrap", void 0);
tslib_1.__decorate([
core_1.attribute("trusted", false)
(0, core_1.attribute)("trusted", false)
], PublicKey.prototype, "trusted", void 0);
exports.PublicKey = PublicKey;

@@ -22,40 +22,40 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("sensitive")
(0, core_1.attribute)("sensitive")
], SecretKey.prototype, "sensitive", void 0);
tslib_1.__decorate([
core_1.attribute("encrypt", false)
(0, core_1.attribute)("encrypt", false)
], SecretKey.prototype, "encrypt", void 0);
tslib_1.__decorate([
core_1.attribute("decrypt", false)
(0, core_1.attribute)("decrypt", false)
], SecretKey.prototype, "decrypt", void 0);
tslib_1.__decorate([
core_1.attribute("verify", false)
(0, core_1.attribute)("verify", false)
], SecretKey.prototype, "verify", void 0);
tslib_1.__decorate([
core_1.attribute("sign")
(0, core_1.attribute)("sign")
], SecretKey.prototype, "sign", void 0);
tslib_1.__decorate([
core_1.attribute("wrap", false)
(0, core_1.attribute)("wrap", false)
], SecretKey.prototype, "wrap", void 0);
tslib_1.__decorate([
core_1.attribute("unwrap", false)
(0, core_1.attribute)("unwrap", false)
], SecretKey.prototype, "unwrap", void 0);
tslib_1.__decorate([
core_1.attribute("extractable")
(0, core_1.attribute)("extractable")
], SecretKey.prototype, "extractable", void 0);
tslib_1.__decorate([
core_1.attribute("alwaysSensitive")
(0, core_1.attribute)("alwaysSensitive")
], SecretKey.prototype, "alwaysSensitive", void 0);
tslib_1.__decorate([
core_1.attribute("neverExtractable")
(0, core_1.attribute)("neverExtractable")
], SecretKey.prototype, "neverExtractable", void 0);
tslib_1.__decorate([
core_1.attribute("checkValue")
(0, core_1.attribute)("checkValue")
], SecretKey.prototype, "checkValue", void 0);
tslib_1.__decorate([
core_1.attribute("wrapWithTrusted")
(0, core_1.attribute)("wrapWithTrusted")
], SecretKey.prototype, "wrapTrusted", void 0);
tslib_1.__decorate([
core_1.attribute("trusted")
(0, core_1.attribute)("trusted")
], SecretKey.prototype, "trusted", void 0);
exports.SecretKey = SecretKey;

@@ -10,13 +10,13 @@ "use strict";

tslib_1.__decorate([
core_1.attribute("token")
(0, core_1.attribute)("token")
], Storage.prototype, "token", void 0);
tslib_1.__decorate([
core_1.attribute("private")
(0, core_1.attribute)("private")
], Storage.prototype, "private", void 0);
tslib_1.__decorate([
core_1.attribute("modifiable")
(0, core_1.attribute)("modifiable")
], Storage.prototype, "modifiable", void 0);
tslib_1.__decorate([
core_1.attribute("label")
(0, core_1.attribute)("label")
], Storage.prototype, "label", void 0);
exports.Storage = Storage;

@@ -12,2 +12,3 @@ "use strict";

const crypto_1 = require("./crypto");
const error_1 = require("./error");
var SessionFlag;

@@ -146,7 +147,8 @@ (function (SessionFlag) {

catch (e) {
const error = (0, error_1.prepareError)(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -191,7 +193,8 @@ }

catch (e) {
const error = (0, error_1.prepareError)(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -228,7 +231,8 @@ }

catch (e) {
const error = (0, error_1.prepareError)(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -257,7 +261,8 @@ }

catch (e) {
const error = (0, error_1.prepareError)(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -286,7 +291,8 @@ }

catch (e) {
const error = (0, error_1.prepareError)(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -293,0 +299,0 @@ }

@@ -29,3 +29,3 @@ "use strict";

const res = this.lib.C_InitToken(this.handle, pin, label);
return core_1.removePadding(res);
return (0, core_1.removePadding)(res);
}

@@ -32,0 +32,0 @@ open(flags = _1.SessionFlag.SERIAL_SESSION) {

import * as pkcs11 from "pkcs11js";
import * as core from "./core";
import { prepareError } from "./error";
import { SlotCollection } from "./slot";

@@ -23,4 +24,5 @@ export class Module extends core.BaseObject {

catch (e) {
if (!/CKR_CRYPTOKI_ALREADY_INITIALIZED/.test(e.message)) {
throw e;
const error = prepareError(e);
if (!/CKR_CRYPTOKI_ALREADY_INITIALIZED/.test(error.message)) {
throw error;
}

@@ -27,0 +29,0 @@ }

@@ -8,2 +8,3 @@ import * as core from "./core";

import { Cipher, Decipher, Digest, Sign, Verify } from "./crypto";
import { prepareError } from "./error";
export var SessionFlag;

@@ -142,7 +143,8 @@ (function (SessionFlag) {

catch (e) {
const error = prepareError(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -187,7 +189,8 @@ }

catch (e) {
const error = prepareError(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -224,7 +227,8 @@ }

catch (e) {
const error = prepareError(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -253,7 +257,8 @@ }

catch (e) {
const error = prepareError(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -282,7 +287,8 @@ }

catch (e) {
const error = prepareError(e);
if (callback) {
callback(e, null);
callback(error, null);
}
else {
throw e;
throw error;
}

@@ -289,0 +295,0 @@ }

{
"name": "graphene-pk11",
"version": "2.3.0",
"version": "2.3.1",
"description": "A simple layer for interacting with PKCS #11 / PKCS11 / CryptoKI for Node in TypeScript",

@@ -39,16 +39,16 @@ "main": "./build/cjs/index.js",

"dependencies": {
"pkcs11js": "^1.2.3",
"tslib": "^2.3.1"
"pkcs11js": "^1.3.0",
"tslib": "^2.4.0"
},
"devDependencies": {
"@types/mocha": "^9.0.0",
"@types/node": "^16.7.1",
"@types/mocha": "^9.1.1",
"@types/node": "^18.0.0",
"coveralls": "^3.1.0",
"mocha": "^9.1.0",
"mocha": "^10.0.0",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"ts-node": "^10.2.1",
"ts-node": "^10.8.1",
"tslint": "^6.1.3",
"typedoc": "^0.21.6",
"typescript": "^4.2.4"
"typedoc": "^0.22.17",
"typescript": "^4.7.4"
},

@@ -98,2 +98,7 @@ "bugs": {

},
"resolutions": {
"ansi-regex": "^5.0.1",
"json-schema": "^0.4.0",
"minimist": "^1.2.6"
},
"funding": {

@@ -100,0 +105,0 @@ "type": "github",

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