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.0.32 to 2.0.33

4

build/module.js

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

};
Module.prototype.initialize = function () {
this.lib.C_Initialize();
Module.prototype.initialize = function (options) {
this.lib.C_Initialize(options);
this.getInfo();

@@ -27,0 +27,0 @@ };

@@ -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)

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

@@ -32,3 +32,3 @@ "main": "./build/graphene.js",

"int64-buffer": "^0.1.10",
"pkcs11js": "^1.0.13",
"pkcs11js": "^1.0.14",
"tslib": "^1.9.0"

@@ -38,6 +38,6 @@ },

"@types/node": "^8.5.9",
"coveralls": "^2.13.3",
"mocha": "^3.5.3",
"nyc": "^11.4.1",
"typescript": "^2.6.2"
"coveralls": "^3.0.0",
"mocha": "^5.0.5",
"nyc": "^11.6.0",
"typescript": "^2.7.2"
},

@@ -56,3 +56,4 @@ "bugs": {

"RSA",
"ECC"
"ECC",
"nss"
],

@@ -59,0 +60,0 @@ "author": "PeculiarVentures",

@@ -564,2 +564,37 @@ # Graphene

### Initializing NSS crypto library
Use `options` parameter for `Module::initialize` method.
__Type__
```ts
interface InitializationOptions {
/**
* NSS library parameters
*/
libraryParameters?: string;
/**
* bit flags specifying options for `C_Initialize`
* - CKF_LIBRARY_CANT_CREATE_OS_THREADS. True if application threads which are executing calls to the library
* may not use native operating system calls to spawn new threads; false if they may
* - CKF_OS_LOCKING_OK. True if the library can use the native operation system threading model for locking;
* false otherwise
*/
flags?: number;
}
```
__Code__
```js
const mod = Module.load("/usr/local/opt/nss/lib/libsoftokn3.dylib", "NSS");
mod.initialize({
libraryParameters: "configdir='' certPrefix='' keyPrefix='' secmod='' flags=readOnly,noCertDB,noModDB,forceOpen,optimizeSpace",
});
// Your code here
mod.finalize();
```
## Developing

@@ -566,0 +601,0 @@ Use npm command to publish graphene-pk11 module

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

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

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

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

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

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

@@ -0,0 +0,0 @@ /// <reference path="../index.d.ts" />

var assert = require('assert');
var os = require('os');
var config = require('./config.json');

@@ -50,2 +51,23 @@ var graphene = require('../build/graphene');

});
context("NSS", () => {
const libPathNSS = os.platform() === "darwin" ? "/usr/local/opt/nss/lib/libsoftokn3.dylib" : "/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so";
it("Initialize", () => {
const mod = Module.load(libPathNSS, "NSS");
mod.initialize({
libraryParameters: "configdir='' certPrefix='' keyPrefix='' secmod='' flags=readOnly,noCertDB,noModDB,forceOpen,optimizeSpace",
});
const slot = mod.getSlots(1, true);
const session = slot.open();
const rnd = session.generateRandom(20);
assert.equal(!!rnd, true);
assert.equal(rnd.length, 20);
mod.finalize();
});
});
});

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

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

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

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

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

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

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

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

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

Sorry, the diff of this file is not supported yet

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