Skip to content

Commit cbfa7b7

Browse files
committed
Bug fix: setting custom certificate directory no longer causes crash
1 parent a3b4ea0 commit cbfa7b7

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## Unreleased
88

9+
## [1.0.4] - 2019-11-26
10+
11+
### Fixed
12+
13+
- Setting a custom certificate directory no longer causes a crash.
14+
915
## [1.0.3] - 2019-11-26
1016

1117
### Fixed

‎index.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,12 @@ Greenlock.createServer = function(options, requestListener) {
125125
if (options.certificateDirectory != null) {
126126
// Since we are using local certificates, we will store them in
127127
// <directory-person-asked-for>/global
128-
options.glConfigDir = path.join(certificateDirectory, 'global')
128+
// (configDir is the property Greenlock uses internally.)
129+
options.configDir = path.join(path.resolve(options.certificateDirectory), 'global')
129130
}
130131

132+
console.log('Will look for certs in', options.configDir)
133+
131134
// Add TLS options from the ACME TLS Certificate to any existing options that
132135
// might have been passed in above. (Currently, this is the SNICallback function.)
133136
const greenlock = Greenlock.create(options)

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@small-tech/https",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "Drop in replacement for Node https module that automatically handles certificate provisioning both at localhost (via Nodecert/mkcert) and at hostname (via Let’s Encrypt).",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)