Merge remote-tracking branch 'MaitreyaBuddha/master' into master
This commit is contained in:
commit
f79c62032c
|
@ -6,7 +6,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
//var LeCore = require('letiny-core');
|
//var LeCore = require('letiny-core');
|
||||||
var LeCore = require('../');
|
var LeCore = require('../').ACME.create();
|
||||||
|
|
||||||
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
|
||||||
|
@ -17,8 +17,8 @@ var certStore = require('./cert-store');
|
||||||
var serve = require('./serve');
|
var serve = require('./serve');
|
||||||
var closer;
|
var closer;
|
||||||
|
|
||||||
var accountPrivateKeyPem = null;
|
var accountKeypair = null;
|
||||||
var domainPrivateKeyPem = null;
|
var domainKeypair = null;
|
||||||
var acmeUrls = null;
|
var acmeUrls = null;
|
||||||
|
|
||||||
|
|
||||||
|
@ -44,14 +44,14 @@ function init() {
|
||||||
|
|
||||||
function getPrivateKeys(cb) {
|
function getPrivateKeys(cb) {
|
||||||
console.log('Generating Account Keypair');
|
console.log('Generating Account Keypair');
|
||||||
console.log("(Note: if you're using forge and not ursa, this will take a long time");
|
const RSA = require('rsa-compat').RSA;
|
||||||
LeCore.leCrypto.generateRsaKeypair(2048, 65537, function (err, pems) {
|
RSA.generateKeypair(2048, 65537, {}, function (err, pems) {
|
||||||
|
|
||||||
accountPrivateKeyPem = pems.privateKeyPem;
|
accountKeypair = pems;
|
||||||
console.log('Generating Domain Keypair');
|
console.log('Generating Domain Keypair');
|
||||||
LeCore.leCrypto.generateRsaKeypair(2048, 65537, function (err, pems) {
|
RSA.generateKeypair(2048, 65537, {}, function (err, pems2) {
|
||||||
|
|
||||||
domainPrivateKeyPem = pems.privateKeyPem;
|
domainKeypair = pems2;
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -62,7 +62,7 @@ function runDemo() {
|
||||||
LeCore.registerNewAccount(
|
LeCore.registerNewAccount(
|
||||||
{ newRegUrl: acmeUrls.newReg
|
{ newRegUrl: acmeUrls.newReg
|
||||||
, email: email
|
, email: email
|
||||||
, accountPrivateKeyPem: accountPrivateKeyPem
|
, accountKeypair: accountKeypair
|
||||||
, agreeToTerms: function (tosUrl, done) {
|
, agreeToTerms: function (tosUrl, done) {
|
||||||
|
|
||||||
// agree to the exact version of these terms
|
// agree to the exact version of these terms
|
||||||
|
@ -82,8 +82,8 @@ function runDemo() {
|
||||||
{ newAuthzUrl: acmeUrls.newAuthz
|
{ newAuthzUrl: acmeUrls.newAuthz
|
||||||
, newCertUrl: acmeUrls.newCert
|
, newCertUrl: acmeUrls.newCert
|
||||||
|
|
||||||
, domainPrivateKeyPem: domainPrivateKeyPem
|
, domainKeypair: domainKeypair
|
||||||
, accountPrivateKeyPem: accountPrivateKeyPem
|
, accountKeypair: accountKeypair
|
||||||
, domains: domains
|
, domains: domains
|
||||||
|
|
||||||
, setChallenge: challengeStore.set
|
, setChallenge: challengeStore.set
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
"example": "example",
|
"example": "example",
|
||||||
"test": "test"
|
"test": "test"
|
||||||
},
|
},
|
||||||
"scripts": {
|
|
||||||
"test": "node example/letsencrypt.js"
|
|
||||||
},
|
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://git.daplie.com/Daplie/le-acme-core.git"
|
"url": "git+https://git.daplie.com/Daplie/le-acme-core.git"
|
||||||
|
@ -39,6 +36,7 @@
|
||||||
"better-assert": "^1.0.2",
|
"better-assert": "^1.0.2",
|
||||||
"chai": "^3.5.0",
|
"chai": "^3.5.0",
|
||||||
"chai-string": "^1.3.0",
|
"chai-string": "^1.3.0",
|
||||||
|
"localhost.daplie.me-certificates": "^1.3.0",
|
||||||
"request-debug": "^0.2.0"
|
"request-debug": "^0.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue