walnut.js/snippets/test-acme.js

25 lines
567 B
JavaScript
Raw Normal View History

2015-02-19 06:06:56 +00:00
var acme = require("node-acme");
var acmeServer = "www.letsencrypt-demo.org";
var desiredIdentifier = "testssl.coolaj86.com";
var authzURL = "https://" + acmeServer + "/acme/new-authz";
var certURL = "https://" + acmeServer + "/acme/new-cert";
acme.getMeACertificate(authzURL, certURL, desiredIdentifier, function(x) {
console.log("Result of getMeACertificate:");
console.log(x);
/*
if (acmeServer.match(/localhost/)) {
server.close();
}
*/
});
/*
if (acmeServer.match(/localhost/)) {
// TODO for internal peers?
acme.enableLocalUsage();
}
*/