nearly complete
This commit is contained in:
parent
40cc0bd8a5
commit
db71fc5661
|
@ -1,13 +1,14 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var LeCore = require('letiny-core');
|
//var LeCore = require('letiny-core');
|
||||||
|
var LeCore = require('../');
|
||||||
|
|
||||||
var email = process.argv[2] || 'user@example.com'; // CHANGE TO YOUR EMAIL
|
var email = process.argv[2] || 'user@example.com'; // CHANGE TO YOUR EMAIL
|
||||||
var domains = [process.argv[3] || 'example.com']; // CHANGE TO YOUR DOMAIN
|
var domains = [process.argv[3] || 'example.com']; // CHANGE TO YOUR DOMAIN
|
||||||
var acmeDiscoveryUrl = LeCore.stagingServerUrl;
|
var acmeDiscoveryUrl = LeCore.stagingServerUrl;
|
||||||
|
|
||||||
var challengeStore = require('./challenge-store');
|
var challengeStore = require('./challenge-store');
|
||||||
var certStore = require('cert-store');
|
var certStore = require('./cert-store');
|
||||||
var serve = require('./serve');
|
var serve = require('./serve');
|
||||||
|
|
||||||
var accountPrivateKeyPem = null;
|
var accountPrivateKeyPem = null;
|
||||||
|
@ -34,10 +35,10 @@ function init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPrivateKeys() {
|
function getPrivateKeys() {
|
||||||
LeCore.leCrypto.generateRsaKeypair(2048, 65537, function (pems) {
|
LeCore.leCrypto.generateRsaKeypair(2048, 65537, function (err, pems) {
|
||||||
|
|
||||||
accountPrivateKeyPem = pems.privateKeyPem;
|
accountPrivateKeyPem = pems.privateKeyPem;
|
||||||
LeCore.leCrypto.generateRsaKeypair(2048, 65537, function (pems) {
|
LeCore.leCrypto.generateRsaKeypair(2048, 65537, function (err, pems) {
|
||||||
|
|
||||||
domainPrivateKeyPem = pems.privateKeyPem;
|
domainPrivateKeyPem = pems.privateKeyPem;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var request = require('request');
|
var request = require('request');
|
||||||
var leUtils = require('./acme-utils');
|
var leUtils = require('./acme-util');
|
||||||
var leCrypto = require('./letsencrypt-node-crypto');
|
var leCrypto = require('./letsencrypt-node-crypto');
|
||||||
var leForge = require('./letsencrypt-forge');
|
var leForge = require('./letsencrypt-forge');
|
||||||
var leUrsa;
|
var leUrsa;
|
||||||
|
|
10
node.js
10
node.js
|
@ -13,6 +13,16 @@ function create(deps) {
|
||||||
LeCore.registerNewAccount = require('./lib/register-new-account').create(deps);
|
LeCore.registerNewAccount = require('./lib/register-new-account').create(deps);
|
||||||
LeCore.getCertificate = require('./lib/get-certificate').create(deps);
|
LeCore.getCertificate = require('./lib/get-certificate').create(deps);
|
||||||
|
|
||||||
|
// Note: these are NOT DEFAULTS
|
||||||
|
// They are de facto standards that you may
|
||||||
|
// or may not use in your implementation
|
||||||
|
LeCore.productionServerUrl = "https://acme-v01.api.letsencrypt.org/directory";
|
||||||
|
LeCore.stagingServerUrl = "https://acme-staging.api.letsencrypt.org/directory";
|
||||||
|
LeCore.acmeChallengePrefix = "/.well-known/acme-challenge/";
|
||||||
|
LeCore.configDir = "/etc/letsencrypt/";
|
||||||
|
LeCore.logsDir = "/var/log/letsencrypt/";
|
||||||
|
LeCore.workDir = "/var/lib/letsencrypt/";
|
||||||
|
|
||||||
return LeCore;
|
return LeCore;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue