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

@root/greenlock

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@root/greenlock - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

67

certificates.js

@@ -74,3 +74,3 @@ 'use strict';

// notify in the background
var renewAt = C._renewableAt(gnlck, mconf, args, newPems);
var renewAt = C._renewWithStagger(gnlck, mconf, args, newPems);
gnlck._notify(evname, {

@@ -81,2 +81,8 @@ renewAt: renewAt,

});
gnlck._notify('_cert_issue', {
renewAt: renewAt,
subject: args.subject,
altnames: args.altnames,
pems: newPems
});
}).catch(function(err) {

@@ -170,11 +176,2 @@ if (!err.context) {

.then(function(pems) {
var renewAt = C._renewableAt(gnlck, mconf, args, pems);
gnlck._notify('_cert_issue', {
renewAt: renewAt,
subject: args.subject,
altnames: args.altnames,
pems: pems
});
if (kresult.exists) {

@@ -275,12 +272,40 @@ return pems;

C._renewableAt = function(gnlck, mconf, args, pems) {
if (args.renewAt) {
return args.renewAt;
C._renewWithStagger = function(gnlck, mconf, args, pems) {
var renewOffset = C._renewOffset(gnlck, mconf, args, pems);
var renewStagger;
try {
renewStagger = U._parseDuration(
args.renewStagger ||
mconf.renewStagger ||
gnlck._defaults.renewStagger ||
0
);
} catch (e) {
renewStagger = U._parseDuration(gnlck._defaults.renewStagger);
}
var renewOffset =
// TODO check this beforehand
if (!args.force && renewStagger / renewOffset >= 0.5) {
renewStagger = renewOffset * 0.1;
}
if (renewOffset > 0) {
// stagger forward, away from issued at
return Math.round(
pems.issuedAt + renewOffset + Math.random() * renewStagger
);
}
// stagger backward, toward issued at
return Math.round(
pems.expiresAt + renewOffset - Math.random() * renewStagger
);
};
C._renewOffset = function(gnlck, mconf, args, pems) {
var renewOffset = U._parseDuration(
args.renewOffset ||
mconf.renewOffset ||
gnlck._defaults.renewOffset ||
0;
mconf.renewOffset ||
gnlck._defaults.renewOffset ||
0
);
var week = 1000 * 60 * 60 * 24 * 6;

@@ -292,3 +317,11 @@ if (!args.force && Math.abs(renewOffset) < week) {

}
return renewOffset;
};
C._renewableAt = function(gnlck, mconf, args, pems) {
if (args.renewAt) {
return args.renewAt;
}
var renewOffset = C._renewOffset(gnlck, mconf, args, pems);
if (renewOffset > 0) {

@@ -295,0 +328,0 @@ return pems.issuedAt + renewOffset;

{
"name": "@root/greenlock",
"version": "3.0.3",
"version": "3.0.4",
"description": "The easiest Let's Encrypt client for Node.js and Browsers",

@@ -5,0 +5,0 @@ "homepage": "https://rootprojects.org/greenlock/",

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