
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@ind.ie/acme
Advanced tools
Free SSL for everybody. The bare essentials of the Let's Encrypt v2 (ACME) API. Built for Greenlock, by request.
| A Root Project |
This is intented for building ACME API clients in node.js. It is not a high-level, fully-integrated solution.
You may be more interested in one of these:
As this is intended to build ACME clients, there is not a simple 2-line example.
I'd recommend first trying out one of the greenlock-express.js or Greenlock for Web Servers examples, which are guaranteed to work and have great error checking to help you debug.
Then I'd recommend running the example CLI client with a test domain and then investigating the files used for that example:
git clone https://git.coolaj86.com/coolaj86/acme.js.git
pushd acme.js/
node examples/cli.js
The example cli has the following prompts:
What web address(es) would you like to get certificates for? (ex: example.com,*.example.com)
What challenge will you be testing today? http-01 or dns-01? [http-01]
What email should we use? (optional)
What directoryUrl should we use? [https://acme-staging-v02.api.letsencrypt.org/directory]
Put the string 'mBfh0SqaAV3MOK3B6cAhCbIReAyDuwuxlO1Sl70x6bM.VNAzCR4THe4czVzo9piNn73B1ZXRLaB2CESwJfKkvRM' into a file at 'example.com/.well-known/acme-challenge/mBfh0SqaAV3MOK3B6cAhCbIReAyDuwuxlO1Sl70x6bM'
echo 'mBfh0SqaAV3MOK3B6cAhCbIReAyDuwuxlO1Sl70x6bM.VNAzCR4THe4czVzo9piNn73B1ZXRLaB2CESwJfKkvRM' > 'example.com/.well-known/acme-challenge/mBfh0SqaAV3MOK3B6cAhCbIReAyDuwuxlO1Sl70x6bM'
Then hit the 'any' key to continue...
When you've completed the challenge you can hit a key to continue the process.
If you place the certificate you receive back in tests/fullchain.pem
then you can test it with examples/https-server.js
.
examples/cli.js
examples/genkeypair.js
examples/https-server.js
examples/http-server.js
This library (acme.js) supports ACME draft 11, otherwise known as Let's Encrypt v2 (or v02).
# Production URL
https://acme-v02.api.letsencrypt.org/directory
# Staging URL
https://acme-staging-v02.api.letsencrypt.org/directory
Install via npm
npm install --save acme
Install via git
npm install https://git.coolaj86.com/coolaj86/acme.js.git
This API is an evolution of le-acme-core, but tries to provide a better mapping to the new draft 11 APIs.
Status: Almost stable, but not semver locked.
Patch versions will not introduce breaking changes, but may introduce lower-level APIs. Minor versions may change return values to include more information.
var ACME = require('acme').ACME;
ACME.create(opts)
acme.init(acmeDirectoryUrl)
acme.accounts.create(opts)
acme.certificates.create(opts)
var ACME = require('acme').ACME;
// Create Instance (Dependency Injection)
var acme = ACME.create({
RSA: require('rsa-compat').RSA
// other overrides
, request: require('request')
, promisify: require('util').promisify
// used for constructing user-agent
, os: require('os')
, process: require('process')
// used for overriding the default user-agent
, userAgent: 'My custom UA String'
, getUserAgentString: function (deps) { return 'My custom UA String'; }
// don't try to validate challenges locally
, skipChallengeTest: false
});
// Discover Directory URLs
acme.init(acmeDirectoryUrl) // returns Promise<acmeUrls={keyChange,meta,newAccount,newNonce,newOrder,revokeCert}>
// Accounts
acme.accounts.create(options) // returns Promise<regr> registration data
{ email: '<email>' // valid email (server checks MX records)
, accountKeypair: { // privateKeyPem or privateKeyJwt
privateKeyPem: '<ASCII PEM>'
}
, agreeToTerms: fn (tosUrl) {} // returns Promise with tosUrl
}
// Registration
acme.certificates.create(options) // returns Promise<pems={ privkey (key), cert, chain (ca) }>
{ newAuthzUrl: '<url>' // specify acmeUrls.newAuthz
, newCertUrl: '<url>' // specify acmeUrls.newCert
, domainKeypair: {
privateKeyPem: '<ASCII PEM>'
}
, accountKeypair: {
privateKeyPem: '<ASCII PEM>'
}
, domains: [ 'example.com' ]
, setChallenge: fn (hostname, key, val) // return Promise
, removeChallenge: fn (hostname, key) // return Promise
}
Helpers & Stuff
// Constants
ACME.challengePrefixes['http-01'] // '/.well-known/acme-challenge'
ACME.challengePrefixes['dns-01'] // '_acme-challenge'
promisify
from node's util or bluebirdoptions.contact
to provide raw contact arrayoptions.email
optionalacme.js | MPL-2.0 | Terms of Use | Privacy Policy
FAQs
For of acme.js that loads our own fork of acme-v2.js
The npm package @ind.ie/acme receives a total of 0 weekly downloads. As such, @ind.ie/acme popularity was classified as not popular.
We found that @ind.ie/acme demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.