New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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

to
2.0.25

0

capabilities/Safenet.md

@@ -0,0 +0,0 @@ **PKCS #11 DEVICE CAPABILITIES**

@@ -0,0 +0,0 @@ **[SafeNet Luna G5](http://www.safenet-inc.com/data-encryption/hardware-security-modules-hsms/luna-hsms-key-management/luna-G5-usb-attached-hsm/) PKCS #11 DEVICE CAPABILITIES**

@@ -0,0 +0,0 @@ **SoftHSM2 PKCS#11 DEVICE CAPABILITIES**

@@ -0,0 +0,0 @@ **Thales nShield PKCS#11 DEVICE CAPABILITIES**

@@ -0,0 +0,0 @@ **Thales nShield PCI 500 F3 PKCS#11 DEVICE CAPABILITIES**

@@ -0,0 +0,0 @@ **Thales nShield Solo+ PKCS#11 DEVICE CAPABILITIES**

@@ -0,0 +0,0 @@ ##Device Capabilities

@@ -0,0 +0,0 @@ The MIT License (MIT)

2

package.json
{
"name": "graphene-pk11",
"version": "2.0.24",
"version": "2.0.25",
"description": "A simple layer for interacting with PKCS #11 / PKCS11 / CryptoKI for Node in TypeScript",

@@ -5,0 +5,0 @@ "main": "./build/graphene.js",

@@ -0,0 +0,0 @@ # Graphene

@@ -0,0 +0,0 @@ # Scenarios

@@ -0,0 +0,0 @@ export * from "./core/object";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ export class Pkcs11Error extends Error {

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ export function isString(v: any) {

@@ -0,0 +0,0 @@ export function dateFromString(text: string) {

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ export * from "./cipher";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -7,2 +7,3 @@ export * from "./core";

export * from "./session";
export {Mechanism, MechanismFlag, MechanismEnum, MechanismType} from "./mech";
export { Mechanism, MechanismFlag, MechanismEnum, MechanismType } from "./mech";
export { registerAttribute } from "./template";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ export * from "./params"

@@ -0,0 +0,0 @@ export * from "../core";

@@ -0,0 +0,0 @@ const namedCurves: INamedCurve[] = [

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ export interface IParams {

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

import * as pkcs11 from "pkcs11js";
import * as core from "./core";
import {Session} from "./session";
import {ITemplate, Template} from "./template";
import { Session } from "./session";
import { ITemplate, Template } from "./template";

@@ -26,4 +26,4 @@ export enum ObjectClass {

/**
* gets the size of an object in bytes
*
* gets the size of an object in bytes
*
* @readonly

@@ -38,3 +38,3 @@ * @type {number}

* Creates an instance of SessionObject.
*
*
* @param {SessionObject} object

@@ -45,3 +45,3 @@ */

* Creates an instance of SessionObject.
*
*
* @param {number} handle

@@ -70,3 +70,3 @@ * @param {Session} session

* copies an object, creating a new object for the copy
*
*
* @param {ITemplate} template template for the new object

@@ -90,12 +90,14 @@ * @returns {SessionObject}

getAttribute(attr: string): ITemplate;
getAttribute(attr: string): any;
getAttribute(attrs: ITemplate): ITemplate;
getAttribute(attrs: any): ITemplate {
getAttribute(attrs: any): any {
let _attrs: ITemplate;
if (typeof attrs === "string") {
// string
_attrs = {};
(_attrs as any)[attrs] = null;
} else {
// template
_attrs = attrs;
}
else
_attrs = attrs;
let tmpl = Template.toPkcs11(_attrs);

@@ -106,2 +108,5 @@

if (typeof attrs === "string") {
return Template.fromPkcs11(tmpl)[attrs];
}
return Template.fromPkcs11(tmpl);

@@ -144,3 +149,3 @@ }

toType<T extends SessionObject>(): T {
// auto detect type of object
// auto detect type of object
let c = this.class;

@@ -147,0 +152,0 @@ switch (c) {

@@ -0,0 +0,0 @@ import {Certificate} from "./cert";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ export * from "./cert";

@@ -0,0 +0,0 @@ import {Certificate} from "./cert";

@@ -0,0 +0,0 @@ import {Certificate} from "./cert";

@@ -0,0 +0,0 @@ export * from "./storage";

@@ -6,3 +6,3 @@ import {Storage} from "./storage";

* Other than providing access to it, Cryptoki does not attach any special meaning to a data object
*
*
* @export

@@ -15,4 +15,4 @@ * @class Data

/**
* Description of the application that manages the object (default empty)
*
* Description of the application that manages the object (default empty)
*
* @type {string}

@@ -30,3 +30,3 @@ */

* DER-encoding of the object identifier indicating the data object type (default empty)
*
*
* @type {Buffer}

@@ -43,4 +43,4 @@ */

/**
* Value of the object (default empty)
*
* Value of the object (default empty)
*
* @type {Buffer}

@@ -47,0 +47,0 @@ */

@@ -0,0 +0,0 @@ import {Storage} from "./storage";

@@ -0,0 +0,0 @@ export * from "./key";

@@ -0,0 +0,0 @@ import { Storage } from "../storage";

@@ -0,0 +0,0 @@ import { Key } from "./key";

@@ -0,0 +0,0 @@ import { Key } from "./key";

@@ -0,0 +0,0 @@ import { Key } from "./key";

@@ -0,0 +0,0 @@ import {SessionObject} from "../object";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

import * as pkcs11 from "pkcs11js";
export interface ITemplate {
[key: string]: any;
/**

@@ -409,3 +410,20 @@ * CKA_CLASS

let attribute = {
export type AttributeItemType = "number" | "boolean" | "string" | "buffer" | "date";
interface AttributeItem {
/**
* Value of Attribute type (CKA_...)
*/
v: number;
/**
* Type of Attribute
*/
t: AttributeItemType;
}
interface AttributeItems {
[key: string]: AttributeItem;
}
const attribute: AttributeItems = {
/* The following attribute types are defined: */

@@ -508,23 +526,23 @@ class: { v: pkcs11.CKA_CLASS, t: TYPE_NUMBER },

* CKA_UNWRAP_TEMPLATE are new for v2.20 */
alwaysAuth: pkcs11.CKA_ALWAYS_AUTHENTICATE,
alwaysAuth: { v: pkcs11.CKA_ALWAYS_AUTHENTICATE, t: TYPE_BUFFER },
wrapWithTrusted: pkcs11.CKA_WRAP_WITH_TRUSTED,
wrapTemplate: pkcs11.CKA_WRAP_TEMPLATE,
unwrapTemplate: pkcs11.CKA_UNWRAP_TEMPLATE,
wrapWithTrusted: { v: pkcs11.CKA_WRAP_WITH_TRUSTED, t: TYPE_BUFFER },
wrapTemplate: { v: pkcs11.CKA_WRAP_TEMPLATE, t: TYPE_BUFFER },
unwrapTemplate: { v: pkcs11.CKA_UNWRAP_TEMPLATE, t: TYPE_BUFFER },
/* CKA_OTP... attributes are new for PKCS #11 v2.20 amendment 3. */
otpFormat: pkcs11.CKA_OTP_FORMAT,
otpLength: pkcs11.CKA_OTP_LENGTH,
otpTimeInterval: pkcs11.CKA_OTP_TIME_INTERVAL,
otpUserFriendlyMode: pkcs11.CKA_OTP_USER_FRIENDLY_MODE,
otpChallengeReq: pkcs11.CKA_OTP_CHALLENGE_REQUIREMENT,
otpTimeReq: pkcs11.CKA_OTP_TIME_REQUIREMENT,
otpCounterReq: pkcs11.CKA_OTP_COUNTER_REQUIREMENT,
otpPinReq: pkcs11.CKA_OTP_PIN_REQUIREMENT,
otpCounter: pkcs11.CKA_OTP_COUNTER,
otpTime: pkcs11.CKA_OTP_TIME,
OtpUserId: pkcs11.CKA_OTP_USER_IDENTIFIER,
otpServiceId: pkcs11.CKA_OTP_SERVICE_IDENTIFIER,
otpServiceLogo: pkcs11.CKA_OTP_SERVICE_LOGO,
otpServiceLogoType: pkcs11.CKA_OTP_SERVICE_LOGO_TYPE,
otpFormat: { v: pkcs11.CKA_OTP_FORMAT, t: TYPE_BUFFER },
otpLength: { v: pkcs11.CKA_OTP_LENGTH, t: TYPE_BUFFER },
otpTimeInterval: { v: pkcs11.CKA_OTP_TIME_INTERVAL, t: TYPE_BUFFER },
otpUserFriendlyMode: { v: pkcs11.CKA_OTP_USER_FRIENDLY_MODE, t: TYPE_BUFFER },
otpChallengeReq: { v: pkcs11.CKA_OTP_CHALLENGE_REQUIREMENT, t: TYPE_BUFFER },
otpTimeReq: { v: pkcs11.CKA_OTP_TIME_REQUIREMENT, t: TYPE_BUFFER },
otpCounterReq: { v: pkcs11.CKA_OTP_COUNTER_REQUIREMENT, t: TYPE_BUFFER },
otpPinReq: { v: pkcs11.CKA_OTP_PIN_REQUIREMENT, t: TYPE_BUFFER },
otpCounter: { v: pkcs11.CKA_OTP_COUNTER, t: TYPE_BUFFER },
otpTime: { v: pkcs11.CKA_OTP_TIME, t: TYPE_BUFFER },
OtpUserId: { v: pkcs11.CKA_OTP_USER_IDENTIFIER, t: TYPE_BUFFER },
otpServiceId: { v: pkcs11.CKA_OTP_SERVICE_IDENTIFIER, t: TYPE_BUFFER },
otpServiceLogo: { v: pkcs11.CKA_OTP_SERVICE_LOGO, t: TYPE_BUFFER },
otpServiceLogoType: { v: pkcs11.CKA_OTP_SERVICE_LOGO_TYPE, t: TYPE_BUFFER },

@@ -534,22 +552,22 @@

* are new for v2.10 */
hwFeatureType: pkcs11.CKA_HW_FEATURE_TYPE,
resetOnInit: pkcs11.CKA_RESET_ON_INIT,
hasReset: pkcs11.CKA_HAS_RESET,
hwFeatureType: { v: pkcs11.CKA_HW_FEATURE_TYPE, t: TYPE_BUFFER },
resetOnInit: { v: pkcs11.CKA_RESET_ON_INIT, t: TYPE_BUFFER },
hasReset: { v: pkcs11.CKA_HAS_RESET, t: TYPE_BUFFER },
/* The following attributes are new for v2.20 */
pixelX: pkcs11.CKA_PIXEL_X,
pixelY: pkcs11.CKA_PIXEL_Y,
resolution: pkcs11.CKA_RESOLUTION,
charRows: pkcs11.CKA_CHAR_ROWS,
charCols: pkcs11.CKA_CHAR_COLUMNS,
color: pkcs11.CKA_COLOR,
bitsPerPixel: pkcs11.CKA_BITS_PER_PIXEL,
charSets: pkcs11.CKA_CHAR_SETS,
encMethod: pkcs11.CKA_ENCODING_METHODS,
mimeTypes: pkcs11.CKA_MIME_TYPES,
mechanismType: pkcs11.CKA_MECHANISM_TYPE,
requiredCmsAttrs: pkcs11.CKA_REQUIRED_CMS_ATTRIBUTES,
defaultCmsAttrs: pkcs11.CKA_DEFAULT_CMS_ATTRIBUTES,
supportedCmsAttrs: pkcs11.CKA_SUPPORTED_CMS_ATTRIBUTES,
allowedMechanisms: pkcs11.CKA_ALLOWED_MECHANISMS
pixelX: { v: pkcs11.CKA_PIXEL_X, t: TYPE_BUFFER },
pixelY: { v: pkcs11.CKA_PIXEL_Y, t: TYPE_BUFFER },
resolution: { v: pkcs11.CKA_RESOLUTION, t: TYPE_BUFFER },
charRows: { v: pkcs11.CKA_CHAR_ROWS, t: TYPE_BUFFER },
charCols: { v: pkcs11.CKA_CHAR_COLUMNS, t: TYPE_BUFFER },
color: { v: pkcs11.CKA_COLOR, t: TYPE_BUFFER },
bitsPerPixel: { v: pkcs11.CKA_BITS_PER_PIXEL, t: TYPE_BUFFER },
charSets: { v: pkcs11.CKA_CHAR_SETS, t: TYPE_BUFFER },
encMethod: { v: pkcs11.CKA_ENCODING_METHODS, t: TYPE_BUFFER },
mimeTypes: { v: pkcs11.CKA_MIME_TYPES, t: TYPE_BUFFER },
mechanismType: { v: pkcs11.CKA_MECHANISM_TYPE, t: TYPE_BUFFER },
requiredCmsAttrs: { v: pkcs11.CKA_REQUIRED_CMS_ATTRIBUTES, t: TYPE_BUFFER },
defaultCmsAttrs: { v: pkcs11.CKA_DEFAULT_CMS_ATTRIBUTES, t: TYPE_BUFFER },
supportedCmsAttrs: { v: pkcs11.CKA_SUPPORTED_CMS_ATTRIBUTES, t: TYPE_BUFFER },
allowedMechanisms: { v: pkcs11.CKA_ALLOWED_MECHANISMS, t: TYPE_BUFFER },
};

@@ -565,3 +583,3 @@

return attr.v;
throw new Error(`Unsupported attribute name '${name}'`);
throw new Error(`Unsupported attribute name '${name}'. Use 'registerAttribute' to add custom attribute.`);
}

@@ -579,3 +597,3 @@

}
throw new Error(`Unsupported attribute ID '${cka}'`);
throw new Error(`Unsupported attribute ID '${cka}'. Use 'registerAttribute' to add custom attribute.`);
}

@@ -585,3 +603,3 @@

* Convert buffer to value
*
*
* @param {Buffer} value

@@ -626,3 +644,3 @@ * @returns {*}

if (type === void 0)
throw new Error(`Can not get type for attribute '${name}'`);
throw new Error(`Can not get type for attribute '${name}'.`);
(res as any)[i2n(attr.type)] = b2v(type, attr.value as Buffer);

@@ -633,1 +651,11 @@ }

}
/**
* Registers new attribute
* @param {string} name name of attribute
* @param {number} value PKCS#11 number value of attribute
* @param {AttributeItemType} type string name of type
*/
export function registerAttribute(name: string, value: number, type: AttributeItemType) {
attribute[name] = { v: value, t: type };
}

@@ -0,0 +0,0 @@ import * as pkcs11 from "pkcs11js";

@@ -0,0 +0,0 @@ var assert = require('assert');

@@ -21,3 +21,3 @@ {

},
"mechanisms": 66
"mechanisms": 67
},

@@ -24,0 +24,0 @@ "slotsCount": 2

@@ -0,0 +0,0 @@ interface IInit {

@@ -0,0 +0,0 @@ var assert = require("assert");

@@ -0,0 +0,0 @@ var assert = require('assert');

@@ -58,2 +58,4 @@ /// <reference path="../index.d.ts" />

graphene.registerAttribute("x509Chain", 123456, "buffer");
mod.finalize();

@@ -0,0 +0,0 @@ var assert = require('assert');

@@ -0,3 +1,6 @@

"use strict";
var assert = require('assert');
var config = require("./config.json");
var pkcs11 = require("pkcs11js");
var graphene = require("../build/graphene");

@@ -56,4 +59,4 @@

var attrs = obj.getAttribute("wrap");
assert.equal(attrs.wrap, true);
var wrap = obj.getAttribute("wrap");
assert.equal(wrap, true);
});

@@ -90,3 +93,3 @@

obj.setAttribute("label", "new label");
assert.equal(obj.getAttribute("label").label, "new label");
assert.equal(obj.getAttribute("label"), "new label");
});

@@ -107,3 +110,3 @@

});
assert.equal(obj.getAttribute("label").label, "new label");
assert.equal(obj.getAttribute("label"), "new label");
});

@@ -141,3 +144,3 @@

});
it("set function", function () {

@@ -161,3 +164,3 @@ var obj = session.create({

var objs = session.find({label: "data.new.label"});
var objs = session.find({ label: "data.new.label" });
assert.equal(objs.length, 1);

@@ -170,2 +173,38 @@

context("custom attribute", () => {
var object = null;
var attrName = "label"
before(() => {
object = session.create({
class: graphene.ObjectClass.DATA,
label: "data.set",
objectId: new Buffer("my custom id"),
token: false,
value: new Buffer("Hello"),
});
// change default type of attribute
graphene.registerAttribute(attrName, pkcs11.CKA_LABEL, "buffer");
})
after(() => {
object.destroy();
// set default value for objectId
graphene.registerAttribute(attrName, pkcs11.CKA_LABEL, "string");
})
it("get value", () => {
const value = object.getAttribute(attrName);
assert.equal(Buffer.isBuffer(value), true);
})
it("set value", () => {
const newValue = "new value";
object.setAttribute(attrName, newValue);
assert.equal(object.getAttribute(attrName), newValue);
})
});
});

@@ -143,3 +143,2 @@ var assert = require('assert');

it("OAEP encrypt/decrypt default SHA-1", function () {
if (isSoftHSM()) return;
test_encrypt_decrypt(keys, { name: "RSA_PKCS_OAEP", params: new graphene.RsaOaepParams() })

@@ -149,3 +148,2 @@ });

it("OAEP encrypt/decrypt SHA-1", function () {
if (isSoftHSM()) return;
test_encrypt_decrypt(keys, { name: "RSA_PKCS_OAEP", params: new graphene.RsaOaepParams(graphene.MechanismEnum.SHA1, graphene.RsaMgf.MGF1_SHA1) })

@@ -184,3 +182,2 @@ });

it("RSA 1.5 sign/verify", function () {
if (isSoftHSM()) return;
test_sign_verify(keys, "RSA_PKCS");

@@ -190,3 +187,2 @@ });

it("RSA 1.5 encrypt/decrypt", function () {
if (isSoftHSM()) return;
test_encrypt_decrypt(keys, "RSA_PKCS")

@@ -196,3 +192,2 @@ });

it("RSA 1.5 wrap/unwrap", function () {
if (isSoftHSM()) return;
test_wrap_unwrap(keys, "RSA_PKCS", skey);

@@ -199,0 +194,0 @@ });

@@ -9,6 +9,6 @@ var assert = require('assert');

describe("Session", function() {
describe("Session", function () {
var mod, slot, session;
before(function() {
before(function () {
mod = Module.load(config.init.lib, config.init.libName);

@@ -19,3 +19,3 @@ mod.initialize();

after(function() {
after(function () {
if (session)

@@ -26,17 +26,17 @@ session.logout();

function test_manufacturer(manufacturerID){
if (mod.manufacturerID == manufacturerID) {
console.warn(" \x1b[33mWARN:\x1b[0m Test is not supported for %s", manufacturerID);
return true;
}
return false;
}
function test_manufacturer(manufacturerID) {
if (mod.manufacturerID == manufacturerID) {
console.warn(" \x1b[33mWARN:\x1b[0m Test is not supported for %s", manufacturerID);
return true;
}
return false;
}
function isThalesNShield() {
return test_manufacturer("nCipher Corp. Ltd");
}
function isThalesNShield() {
return test_manufacturer("nCipher Corp. Ltd");
}
it("login/logout", function() {
it("login/logout", function () {
var session = slot.open();
assert.throws(function() {
assert.throws(function () {
session.login("WrongPin");

@@ -49,3 +49,3 @@ }, Error);

function changePIN(session, userType, oldPIN, newPIN) {
function changePIN(session, userType, oldPIN, newPIN) {
session.login(oldPIN, userType);

@@ -56,4 +56,4 @@ session.setPin(oldPIN, newPIN);

it("changing PIN for User", function() {
var session = slot.open(2|4);
it("changing PIN for User", function () {
var session = slot.open(2 | 4);
try {

@@ -66,3 +66,3 @@ var oldPIN = config.init.pin;

}
catch(e){
catch (e) {
session.close();

@@ -73,5 +73,5 @@ throw e;

}).timeout(60000);
it("changing PIN for SO", function() {
var session = slot.open(2|4);
it("changing PIN for SO", function () {
var session = slot.open(2 | 4);
try {

@@ -81,6 +81,6 @@ var oldPIN = config.init.pin;

assert.equal(graphene.UserType.SO, 0);
changePIN(session, graphene.UserType.USER, oldPIN, newPIN);
changePIN(session, graphene.UserType.USER, newPIN, oldPIN);
changePIN(session, graphene.UserType.SO, oldPIN, newPIN);
changePIN(session, graphene.UserType.SO, newPIN, oldPIN);
}
catch(e){
catch (e) {
session.close();

@@ -92,3 +92,3 @@ throw e;

it("create", function() {
it("create", function () {
// create new session for current test

@@ -127,3 +127,3 @@ session = slot.open();

it("copy", function() {
it("copy", function () {

@@ -137,3 +137,3 @@ session.clear();

label: "label",
valueLen: 256/8,
valueLen: 256 / 8,
extractable: false,

@@ -160,5 +160,5 @@ sensitive: false,

});
it("find", function() {
var template_generator = function(label, value) {
it("find", function () {
var template_generator = function (label, value) {
if (isThalesNShield()) {

@@ -171,3 +171,3 @@ return {

};
} else{
} else {
return {

@@ -181,3 +181,3 @@ class: graphene.ObjectClass.DATA,

}
var count = session.find().length;

@@ -188,3 +188,3 @@

session.create(template_generator("third", "3"));
assert.equal(session.find().length, count + 3);

@@ -200,3 +200,3 @@ var objs = session.find({

it("destroy by template", function() {
it("destroy by template", function () {
var count = session.find().length;

@@ -225,3 +225,3 @@

it("destroy by object", function() {
it("destroy by object", function () {
var count = session.find().length;

@@ -250,3 +250,3 @@

it("clear", function() {
it("clear", function () {
assert.equal(session.find().length !== 0, true);

@@ -260,3 +260,3 @@

it("generate key AES", function() {
it("generate key AES", function () {
var keylen = 256 / 8;

@@ -270,10 +270,10 @@ var key = session.generateKey("AES_KEY_GEN", {

});
if(!isThalesNShield()) {
if (!isThalesNShield()) {
assert.equal(!key.checkValue, false);
}
assert.equal(key.encrypt, true);
assert.equal(key.getAttribute("value").value.length, keylen);
assert.equal(key.getAttribute("value").length, keylen);
});
it("generate key pair RSA", function() {
it("generate key pair RSA", function () {
var keys = session.generateKeyPair(graphene.KeyGenMechanism.RSA, {

@@ -294,9 +294,9 @@ keyType: graphene.KeyType.RSA,

it("getObject wrong handle", function() {
it("getObject wrong handle", function () {
assert.equal(!session.getObject(new Buffer([0xff, 0xff])), true);
});
it("getObject", function() {
it("getObject", function () {
var obj;
session.find(function(o) {
session.find(function (o) {
obj = o;

@@ -321,3 +321,3 @@ return false; // exit on first element

it("sign/verify RSA", function() {
it("sign/verify RSA", function () {
var keys = session.generateKeyPair(graphene.KeyGenMechanism.RSA, {

@@ -324,0 +324,0 @@ keyType: graphene.KeyType.RSA,

@@ -0,0 +0,0 @@ var assert = require("assert");

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet