This commit is contained in:
Philipp Kunz 2016-10-24 02:24:34 +02:00
parent c4b72aebf8
commit b6b06e6853
8 changed files with 55 additions and 21 deletions

View File

@ -0,0 +1 @@
{"creation_host":"Philipps-MBP.fritz.box","creation_dt":"2016-10-24T00:06:02.884Z"}

View File

@ -0,0 +1 @@
{"kty":"RSA","n":"7_P1VlbLtqrK4VHFSWLJ3FErJQLVr-Jh5WyaqFes92ARB4DrbckoMIGUFnSgOfCjwFd_XzNc8OTxqX7_9cW9DWukpLSj7pZ2JhpzdB_U5OnUCGgG0Vn66dTdLJTXPeZSNZiAd4AuBncgwHomY_VwWwfNexuajndxqS-Coe2kkigAB_dYrHiPHPn6MP3a9pZrw0l_9TggOnE414eJgs0v_MP6Qpy1IJfYZoDTcYXeOsangGKSLiUJVXWXXy00plSdepr5HX_fncYu0QQ9fAx2MmYwZcx2LFmFpimcm2NDugtpt5vsxYf3m00aZ4jeg4RNn_dvX-EuPP-Eb3FKJulqvw","e":"AQAB","d":"YWrLDP16ATQ_39Bh51RbHb46ZPFMrfabxhgchgHqcBgpccFuU4kabu78n01EC6Hd6WXciVsB_a8FScoMwsw_36X3FwNblq6xUvDkNJ4DwdgIxEzvj6kXTD2mecYHyNKsR6Qda-a3SNquilZNJcHslpiJXNStH-_wTj7Cq1keulMHvzVHC9KAulJthmOA-weASYsr1dzA0R-ZhoQ4tvfnBkWAhUiMSzRIpeKELmFlUPelV1wXEtBKF7BHSwWmuzn8BuozBBgqOIduzfZ4xp5OEYRfCyU2lp_-J1xD87cdqwLNAsNw8sLEF_NROKd3NgO9vysvjOmVoHwx_uTIwRQXcQ","p":"_LsnXs3QsvwA7vHJg8xLNpNA8MkxRwPEkqSyXIvWt3mFOFmxnU64b9WPAUEZ9VMX0PBY8vYe4LMSgjvLZ1M2VoSadvP5R3KNWA3yapDVCZ9XLq6yVA-Xa-uPhoyITCe_5fAqMCMO9TeKdX74Z5hhRK8xcUBRA7fgXV4dFMcdpVk","q":"8w5-WDU3Hn_yCAQND9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AB"},"contact":["mailto:domains@lossless.org"],"agreement":"https://letsencrypt.org/documents/LE-SA-v1.1.1-August-1-2016.pdf","initialIp":"93.199.240.80","createdAt":"2016-10-24T00:06:01Z","Status":""}}

View File

@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAps/ccP/ZcG4c52QgrjfDJkYUSvYRIEq8zcaR+Jq8iaM+HNWk
zRzCYYh5qxbWzf/bIlo4rTOO9CePZNGyYG7WDy+NLAO2ygdqbHrIxC4cwSoFH3zO
HEPPm4BahMSMK5hcKb7xOH/6xLyXBr588W8VW8BexqnMGq0Z7hDWKvKMBcjQYgIf
FwEw/ykQ1+PZysmLNGAiQuSnlfaeVWaNKAz0tpB7fSQkfe9HNlGa8pRUDrrgg7pL
zpBVGmQwzPMNY2au6erVsGpWtEEqL164lKhXdoQMyvdjdGTfcB5+tBx49WpM1EQ2
VKyn68OImYm1olH6NripDsAfUDASJ/+nd1ZdPQIDAQABAoIBACumRpu3BzHZTmzq
EXclFkakndjDrNWTWPZLmJTCAMXPVoh7CyW0+dRFvvibAFhlM/U4QI5p6GVRGL+b
854yQoc0vS8gRat15049jt1u541QLoj/wns471FUc9s8ByW9N5ig40QSkQ77/lUA
cXdHxwH8Q5Cei88LLrbR5wjT8PnuFwD20HTjhc6XEoESdIX6hX1WXOCjSTkDKb1f
h0vix3+HZ4NL9f1jRm5+kPZ5xTNtWgsiDn8RjyMBciogSG8lE5nA7IiRl16fQaZ7
au3Pl/nVLk80uA3gtH6KjXlQDKrmqPFO78W5tjdfU+BImDCdbn9sQ1to6kAvgND+
TJ122cECgYEA183Gc4kTd9gF32BnZbZW/iqBiUgado0dgADQj4hVmDWqur6J24re
sZP+uBxqN4r9deBoUsbl8cAzYeVG4q3NtDJgiWrKCnitKTxQRC6iDLN57bHbfyR6
+15QjT9QoeizlFLd/cw2Bud0kTCxMQ+GleeoPiYdwJxNNPLZoqrele0CgYEAxeH+
5FwdPlqFekiF9/ZOpGNVy1i+fXYdfgpnnUmUpeZZeVk0aYCQLTsvtXwX0INnOvNk
dYraFHbjcukCZb4/iODxT8mh6TKB6/6UcS+Dw9JLKRvmannZlX/459wLmQZOBKdR
dG3eksoJUt07dBb8yW7k5+QEd38ek3S5nhkC+pECgYBc3XYqvbAdAF72kxurj128
HjqEAv0wSuWI8dDOE1MSHvYLSnc0fHv8Wr1gKQokQLF1ik4aYPEOqTDzTaDFZxmA
E7WrLMMo4mlRt1yrGo4tfQZZHRJhkidCCIINZlOieOreRxK0Zq5RJkTpPdTiUdYO
qBOkOu7OtfQbdu3krDcAuQKBgQCcxUPcBUJB0RNoYqaIYUHCqNQiqucXnIkW/wVB
rjavDIScR9jnMKyIuRg+DtcLId+Z65QOL3hAuEPQGNwGYSgSuCtVy+eTSal2nxVZ
aoxYinVzVyBAANMpxt4aStGBZWZP94Ln29d2scubM5xTh5azu0BsmtATH8nIhrQ7
lZMvkQKBgAM2z2B0rRodhWcENk04KxBbcgRc8/Ae59cYARi0o29/Vh0vK1fBEdQd
2QqjRkh3yJE8Vl/7hqsf4U9KeVazlVwdLK1T8Kr9Uk+Z1Umuh4hxtdOI2gufHjzU
AIEk2EwKJbduVseMoQD0r8Y8eqOFeB+xvv0kZJ7CJxtHUve+RQuf
-----END RSA PRIVATE KEY-----

View File

@ -30,7 +30,6 @@ class Cert {
gitOriginRepo: optionsArg.gitOriginRepo, gitOriginRepo: optionsArg.gitOriginRepo,
certInstance: this certInstance: this
}); });
this._certRepo;
} }
/** /**
* adds a Certificate for a given domain * adds a Certificate for a given domain
@ -66,4 +65,4 @@ class Cert {
} }
} }
exports.Cert = Cert; exports.Cert = Cert;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2VydC5jbGFzc2VzLmNlcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9jZXJ0LmNsYXNzZXMuY2VydC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjo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BQUMsSUFBSSxDQUFDLENBQUMsV0FBVztZQUM1RCxNQUFNLENBQUMsV0FBVyxDQUFDLFVBQVUsS0FBSyxhQUFhLENBQUE7UUFDbkQsQ0FBQyxDQUFDLENBQUE7UUFDRixFQUFFLENBQUMsQ0FBQyxvQkFBb0IsWUFBWSxzQ0FBVyxDQUFDLENBQUMsQ0FBQztZQUM5QyxvQkFBb0IsQ0FBQyxLQUFLLEVBQUU7aUJBQ3ZCLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUE7UUFDM0IsQ0FBQztRQUFDLElBQUksQ0FBQyxDQUFDO1lBQ0osb0JBQW9CLEdBQUcsSUFBSSxzQ0FBVyxDQUFDO2dCQUNuQyxZQUFZLEVBQUUsSUFBSTtnQkFDbEIsVUFBVSxFQUFFLGFBQWE7YUFDNUIsQ0FBQyxDQUFBO1lBQ0Ysb0JBQW9CLENBQUMsS0FBSyxFQUFFO2lCQUN2QixJQUFJLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFBO1FBQzNCLENBQUM7UUFDRCxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtJQUN2QixDQUFDO0lBRUQ7O09BRUc7SUFDSCxvQkFBb0I7SUFFcEIsQ0FBQztJQUVEOztPQUVHO0lBQ0gsTUFBTTtJQUVOLENBQUM7Q0FDSjtBQXBFRCxvQkFvRUMifQ==

View File

@ -19,7 +19,10 @@ class Letsencrypt {
// create leInstance // create leInstance
this._leInstance = letsencrypt.create({ this._leInstance = letsencrypt.create({
server: this._leServerUrl, server: this._leServerUrl,
challenges: { 'dns-01': this._leChallengeHandler() }, challenges: {
'http-01': this._leChallengeHandler(),
'dns-01': this._leChallengeHandler(),
},
challengeType: 'dns-01', challengeType: 'dns-01',
configDir: paths.leConfigDir, configDir: paths.leConfigDir,
privkeyPath: ':configDir/live/:hostname/privkey.pem', privkeyPath: ':configDir/live/:hostname/privkey.pem',
@ -29,7 +32,7 @@ class Letsencrypt {
agreeToTerms: (opts, agreeCb) => { agreeToTerms: (opts, agreeCb) => {
agreeCb(null, opts.tosUrl); agreeCb(null, opts.tosUrl);
}, },
debug: false debug: true
}); });
} }
/** /**
@ -42,10 +45,11 @@ class Letsencrypt {
console.log(this._leServerUrl); console.log(this._leServerUrl);
this._leInstance.register({ this._leInstance.register({
domains: [domainNameArg], domains: [domainNameArg],
email: 'domains@lossless.org', email: 'office@lossless.com',
agreeTos: true, agreeTos: true,
rsaKeySize: 2048 rsaKeySize: 2048,
}).then((results) => { challengeType: 'dns-01'
}).then(results => {
plugins.beautylog.success(`Got certificates for ${domainNameArg}`); plugins.beautylog.success(`Got certificates for ${domainNameArg}`);
this._leCopyToDestination(domainNameArg).then(done.resolve); this._leCopyToDestination(domainNameArg).then(done.resolve);
}, (err) => { }, (err) => {
@ -60,6 +64,7 @@ class Letsencrypt {
// -------------------------------------------- // --------------------------------------------
_leCopyToDestination(domainNameArg) { _leCopyToDestination(domainNameArg) {
let done = q.defer(); let done = q.defer();
done.resolve();
return done.promise; return done.promise;
} }
/** /**
@ -69,7 +74,7 @@ class Letsencrypt {
return { return {
getOptions: () => { getOptions: () => {
return { return {
debug: true debug: false
}; };
}, },
set: (args, domain, challenge, keyAuthorization, cb) => { set: (args, domain, challenge, keyAuthorization, cb) => {
@ -85,7 +90,6 @@ class Letsencrypt {
}); });
}, },
get: (defaults, domain, challenge, cb) => { get: (defaults, domain, challenge, cb) => {
console.log(defaults);
console.log(domain); console.log(domain);
console.log(challenge); console.log(challenge);
cb(); cb();
@ -96,7 +100,7 @@ class Letsencrypt {
cb(); cb();
}); });
}, },
loopback: (opts, domain, token, keyAuthorization, cb) => { loopback: (defaults, domain, challenge, done) => {
cb(); cb();
}, },
test: (defaults, domain, challenge, cb) => { test: (defaults, domain, challenge, cb) => {
@ -106,4 +110,4 @@ class Letsencrypt {
} }
} }
exports.Letsencrypt = Letsencrypt; exports.Letsencrypt = Letsencrypt;
//# sourceMappingURL=data:application/json;base64,e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BQUUsRUFBRTtnQkFDaEMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLGNBQWMsQ0FBQyxNQUFNLENBQUM7cUJBQ3ZDLElBQUksQ0FBQztvQkFDRixFQUFFLEVBQUUsQ0FBQTtnQkFDUixDQUFDLENBQUMsQ0FBQTtZQUNWLENBQUM7WUFDRCxRQUFRLEVBQUUsQ0FBQyxRQUFRLEVBQUUsTUFBTSxFQUFFLFNBQVMsRUFBRSxJQUFJO2dCQUN4QyxFQUFFLEVBQUUsQ0FBQTtZQUNSLENBQUM7WUFDRCxJQUFJLEVBQUUsQ0FBQyxRQUFRLEVBQUUsTUFBTSxFQUFFLFNBQVMsRUFBRSxFQUFFO2dCQUNsQyxFQUFFLEVBQUUsQ0FBQTtZQUNSLENBQUM7U0FDSixDQUFBO0lBQ0wsQ0FBQztDQUNKO0FBeEhELGtDQXdIQyJ9

View File

@ -50,8 +50,6 @@ export class Cert {
gitOriginRepo: optionsArg.gitOriginRepo, gitOriginRepo: optionsArg.gitOriginRepo,
certInstance: this certInstance: this
}) })
this._certRepo
} }
/** /**

View File

@ -38,7 +38,9 @@ export class Letsencrypt {
// create leInstance // create leInstance
this._leInstance = letsencrypt.create({ this._leInstance = letsencrypt.create({
server: this._leServerUrl, server: this._leServerUrl,
challenges: { 'dns-01': this._leChallengeHandler() }, challenges: {
'dns-01': this._leChallengeHandler(),
},
challengeType: 'dns-01', challengeType: 'dns-01',
configDir: paths.leConfigDir, configDir: paths.leConfigDir,
privkeyPath: ':configDir/live/:hostname/privkey.pem', privkeyPath: ':configDir/live/:hostname/privkey.pem',
@ -48,7 +50,7 @@ export class Letsencrypt {
agreeToTerms: (opts, agreeCb) => { agreeToTerms: (opts, agreeCb) => {
agreeCb(null, opts.tosUrl) agreeCb(null, opts.tosUrl)
}, },
debug: false debug: true
}) })
} }
@ -62,11 +64,12 @@ export class Letsencrypt {
console.log(this._leServerUrl) console.log(this._leServerUrl)
this._leInstance.register({ this._leInstance.register({
domains: [domainNameArg], domains: [domainNameArg],
email: 'domains@lossless.org', email: 'office@lossless.com',
agreeTos: true, agreeTos: true,
rsaKeySize: 2048 rsaKeySize: 2048,
challengeType: 'dns-01'
}).then( }).then(
(results) => { results => {
plugins.beautylog.success(`Got certificates for ${domainNameArg}`) plugins.beautylog.success(`Got certificates for ${domainNameArg}`)
this._leCopyToDestination(domainNameArg).then(done.resolve) this._leCopyToDestination(domainNameArg).then(done.resolve)
}, },
@ -85,6 +88,7 @@ export class Letsencrypt {
private _leCopyToDestination(domainNameArg) { private _leCopyToDestination(domainNameArg) {
let done = q.defer() let done = q.defer()
done.resolve()
return done.promise return done.promise
} }
@ -95,7 +99,7 @@ export class Letsencrypt {
return { return {
getOptions: () => { getOptions: () => {
return { return {
debug: true debug: false
} }
}, },
set: (args, domain, challenge, keyAuthorization, cb) => { set: (args, domain, challenge, keyAuthorization, cb) => {
@ -111,7 +115,6 @@ export class Letsencrypt {
}) })
}, },
get: (defaults, domain, challenge, cb) => { get: (defaults, domain, challenge, cb) => {
console.log(defaults)
console.log(domain) console.log(domain)
console.log(challenge) console.log(challenge)
cb() cb()
@ -122,7 +125,7 @@ export class Letsencrypt {
cb() cb()
}) })
}, },
loopback: (opts, domain, token, keyAuthorization, cb) => { loopback: (defaults, domain, challenge, done) => {
cb() cb()
}, },
test: (defaults, domain, challenge, cb) => { test: (defaults, domain, challenge, cb) => {