npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

makemfg

v1.0.1

Published

creates public key certificates

Readme

CLI for creating x509 and Logitech identity certificates

Install

printf "//registry.npmjs.org/:_authToken=011cadc6-399b-4adb-891b-ae8df3c47331\n" > .npmrc
git add .npmrc
npm install @logitech/attest-cli --save

Note: the first command above overrides any npm CLI login in the current directory. The token gives read only access to @logitech private packages.

Folder structure

project root
├── package.json
├── __attest__
│ └── config.json │ └── store.json └── index.js

A folder of the name "__attest__" should be present at the project root. And this folder should contain a file 'config.json', which should contain the configuration of the certificates, that needs to be created. Below is a sample config.json:

{
	"roots": {
		"Logitech DHG Root Device CA": {
			"bits": 2048,
			"md": "sha256",
			"years": 100
		}
	},
	"cas": {
        "Logitech DHG Brownie Bridge CA/skinId=400": {
			"root": "Logitech DHG Root Device CA",
			"bits": 2048,
			"md": "sha256",
			"years": 100
		},
    },
    "boards": {
        "browniebridge_white-pb1": {
			"unitid": true,
			"arch": "0x11",
			"skin": "0x0190",
			"color": "0x00",
			"usb_vendor_id": "0x046D",
			"usb_product_id": "0xC129",
			"hw_ver": "00.00",
			"key": true,
			"cert": {
				"type": "X509",
				"ca": "Logitech DHG Brownie Bridge CA/skinId=400",
				"bits": 2048,
				"md": "sha256",
				"years": 100
			}
		}
    }

In the above json, "Logitech DHG Root Device CA", "Logitech DHG Brownie Bridge CA/skinId=4000" are the exact values of the issuers of the unit certificate. And "cert" property has the value of the issuer certificate.

A CA may have a set of pre-shared keys associated with it in the store.json under the corresponding issuer and there will be a related key in the mfg file as well.

{
    "Logitech DHG Brownie Bridge CA/skinId=4000": {
        "cert": "-----BEGIN CERTIFICATE-----certificateContent-----END CERTIFICATE-----",
        "preSharedKeys": [
            "niP_P03sVShqBs9ph_7W6g",
            "47BClqac-7He-Xyhg6oIJw"
        ]
    }
}

Usage

const { validateCertificate } = require('@logitech/attest')();

//x509 certificate
let cert = `-----BEGIN CERTIFICATE-----certificate value-----END CERTIFICATE-----`;
validateCertificate(cert)
.then(result => {
    let unitId = result.unitId;
    let skinId = result.skinId;
})
.catch(error => console.log(error));

//identity certificate
let cert = `{"iss":"Logitech DHG Brownie Button CA v2/skinId=401",sub":"20160218004838-000000",                 "sig":"signaturevalue"}`;
validateCertificate(cert)
.then(result => {
    let unitId = result.unitId;
    let skinId = result.skinId;
    let key = result.key;
    let ekey = result.ekey;
})
.catch(error => console.log(error));
//'ekey' will be the encrypted value of 'key', which is a random text(encrypted using the presharedkey present in the store.json)
//when "ekey" is decrypted using key in the mfg file, it should match "key".

validateCertificate function

It has one input parameter which will hold the certificate value in PEM format for public key certificates and in Json format for identity certificate. It returns a promise, which will resolve if the certificate is valid. Else if the certificate is invalid, the promise gets rejected with the related error.